From c201f7fa52b6fb707e93228f1d447eac5f6268b8 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Tue, 8 Mar 2022 00:48:29 -0500 Subject: Use first item in list AFTER sorting --- src/seq.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/seq.c b/src/seq.c index 1edfe24..b9e3072 100644 --- a/src/seq.c +++ b/src/seq.c @@ -563,7 +563,7 @@ static inline void timerupdate(struct timeval *tv, } int xas_seq_play(xas_seq *seq, xas_audio_stream *sink) { - xas_seq_event_list_item *item = seq->first; + xas_seq_event_list_item *item; xas_audio_stream *source; size_t frame = 0, @@ -574,13 +574,15 @@ int xas_seq_play(xas_seq *seq, xas_audio_stream *sink) { int16_t *samples; - event_sort(seq); - if ((source = xas_spatial_scene_stream_new(seq->scene, seq->buffer_size)) == NULL) { goto error_spatial_scene_stream_new; } + event_sort(seq); + + item = seq->first; + while (item) { struct timeval tv; -- cgit v1.2.3