summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXANTRONIX Development2022-03-10 18:33:55 -0500
committerXANTRONIX Development2022-03-10 18:33:55 -0500
commit7778a564a418dae8a3bace5101245c26dbdcde5f (patch)
treeca53e7b2cd414226f55c2dd4156ec5dac4bc56af /src
parent2f5b2d36a07e53cf451538c814182ef7722dc776 (diff)
downloadxas-7778a564a418dae8a3bace5101245c26dbdcde5f.tar.gz
xas-7778a564a418dae8a3bace5101245c26dbdcde5f.tar.bz2
xas-7778a564a418dae8a3bace5101245c26dbdcde5f.zip
Make stopping loop more explicit
Diffstat (limited to 'src')
-rw-r--r--src/seq.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/seq.c b/src/seq.c
index c763db4..eca1144 100644
--- a/src/seq.c
+++ b/src/seq.c
@@ -610,12 +610,12 @@ int xas_seq_play(xas_seq *seq, xas_audio_stream *sink) {
timerupdate(&tv, interval, frame);
while (ev && !timercmp(&tv, &ev->timestamp, <)) {
- if (event_trigger(seq->scene, ev) < 0) {
- goto error_event_trigger;
+ if (ev->type == XAS_SEQ_EVENT_STOP) {
+ goto done;
}
- if (ev->next == NULL) {
- goto done;
+ if (event_trigger(seq->scene, ev) < 0) {
+ goto error_event_trigger;
}
ev = ev->next;