From 2d0ff1c6bafe55555b7b3cdd86fa6abda94dc763 Mon Sep 17 00:00:00 2001 From: kugel Date: Wed, 10 Jun 2009 17:15:10 +0000 Subject: [PATCH] Fix FS#10101 and FS#8999. Buffering was stopped prematurely if a manual track skip occured in between, leaving the CPU boosted, because audio_fill_file_buffer() returned if a new track was requested no matter of the filling state. Now keep buffering if it's currently filling the buffer. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21244 a1c6a512-1295-4272-9138-f99709370657 --- apps/playback.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/apps/playback.c b/apps/playback.c index 16c04e1f5..2c526a711 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -1954,12 +1954,13 @@ static void audio_finish_load_track(void) static void audio_fill_file_buffer(bool start_play, size_t offset) { - filling = STATE_FILLING; trigger_cpu_boost(); - /* No need to rebuffer if there are track skips pending. */ - if (ci.new_track != 0) + /* No need to rebuffer if there are track skips pending, + * however don't cancel buffering on skipping while filling. */ + if (ci.new_track != 0 && filling != STATE_FILLING) return; + filling = STATE_FILLING; /* Must reset the buffer before use if trashed or voice only - voice file size shouldn't have changed so we can go straight from -- 2.11.4.GIT