summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/seq.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/seq.c b/src/seq.c
index 054b61c..c763db4 100644
--- a/src/seq.c
+++ b/src/seq.c
@@ -48,6 +48,8 @@ static int event_add(xas_seq *seq, xas_seq_event *ev) {
seq->last = ev;
}
+ ev->next = NULL;
+
return 0;
}
@@ -612,6 +614,10 @@ int xas_seq_play(xas_seq *seq, xas_audio_stream *sink) {
goto error_event_trigger;
}
+ if (ev->next == NULL) {
+ goto done;
+ }
+
ev = ev->next;
}
@@ -630,6 +636,7 @@ int xas_seq_play(xas_seq *seq, xas_audio_stream *sink) {
frame++;
}
+done:
xas_audio_stream_destroy(source);
return frame * buffer_size;