From 9411f2a7279e6c24311bd0c100d494d1cf3b6037 Mon Sep 17 00:00:00 2001 From: Nicolas Pennequin Date: Sun, 21 Oct 2007 19:10:42 +0200 Subject: [PATCH] Make the audio thread wait with a timeout even when filling Hopefully fixes the audio dropout problems when starting playback. I had those with very short files. --- apps/playback.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/playback.c b/apps/playback.c index b87c9aa02..b8ce456ee 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -3212,15 +3212,15 @@ static void audio_thread(void) while (1) { + queue_wait_w_tmo(&audio_queue, &ev, HZ/2); + if (filling) { - queue_wait_w_tmo(&audio_queue, &ev, 0); if (ev.id == SYS_TIMEOUT) ev.id = Q_AUDIO_FILL_BUFFER; } else { - queue_wait_w_tmo(&audio_queue, &ev, HZ/2); #if MEM > 8 if (playing && (ev.id == SYS_TIMEOUT) && !buffering && (bufused() < high_watermark) && (audio_have_free_tracks())) -- 2.11.4.GIT