From 7778a564a418dae8a3bace5101245c26dbdcde5f Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Thu, 10 Mar 2022 18:33:55 -0500 Subject: Make stopping loop more explicit --- src/seq.c | 8 ++++---- 1 file 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; -- cgit v1.2.3