From 25b43346549b3395fae534f1ff581b0df6dc64b6 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Mon, 23 Feb 2009 22:52:15 +0000 Subject: Now that filling is supposed to be reliable we can safely calculate the watermark at the end of buffering, not after every single track. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20095 a1c6a512-1295-4272-9138-f99709370657 --- apps/playback.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/playback.c b/apps/playback.c index d75ecb1781..2421774381 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -2425,6 +2425,8 @@ static void audio_thread(void) while (1) { if (filling != STATE_FILLING) { + /* End of buffering, let's calculate the watermark and unboost */ + set_filebuf_watermark(); cancel_cpu_boost(); } @@ -2436,7 +2438,6 @@ static void audio_thread(void) case Q_AUDIO_FILL_BUFFER: LOGFQUEUE("audio < Q_AUDIO_FILL_BUFFER %d", (int)ev.data); audio_fill_file_buffer((bool)ev.data, 0); - set_filebuf_watermark(); break; case Q_AUDIO_FINISH_LOAD: -- cgit v1.2.3