summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXANTRONIX Development2022-03-08 00:48:29 -0500
committerXANTRONIX Development2022-03-08 00:48:29 -0500
commitc201f7fa52b6fb707e93228f1d447eac5f6268b8 (patch)
tree3f2d4545c08bb77b33de237291598e6af65f04b2 /src
parentaca0cf46f8dc5e909dd0b9ab08330896fb962e4a (diff)
downloadxas-c201f7fa52b6fb707e93228f1d447eac5f6268b8.tar.gz
xas-c201f7fa52b6fb707e93228f1d447eac5f6268b8.tar.bz2
xas-c201f7fa52b6fb707e93228f1d447eac5f6268b8.zip
Use first item in list AFTER sorting
Diffstat (limited to 'src')
-rw-r--r--src/seq.c8
1 files changed, 5 insertions, 3 deletions
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;