diff options
author | Thomas Martitz <kugel@rockbox.org> | 2009-06-10 17:15:10 +0000 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2009-06-10 17:15:10 +0000 |
commit | fc0c2fb5463bc0c8821eab462aecef068680ad92 (patch) | |
tree | c833220d8bba9490e516861ebf84b46454568818 /apps/playback.c | |
parent | ec7c4895fe7a53944966fae6aaabd7bb5a1aa072 (diff) | |
download | rockbox-fc0c2fb5463bc0c8821eab462aecef068680ad92.tar.gz rockbox-fc0c2fb5463bc0c8821eab462aecef068680ad92.zip |
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
Diffstat (limited to 'apps/playback.c')
-rw-r--r-- | apps/playback.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/apps/playback.c b/apps/playback.c index 16c04e1f5b..2c526a711e 100644 --- a/apps/playback.c +++ b/apps/playback.c | |||
@@ -1954,12 +1954,13 @@ static void audio_finish_load_track(void) | |||
1954 | 1954 | ||
1955 | static void audio_fill_file_buffer(bool start_play, size_t offset) | 1955 | static void audio_fill_file_buffer(bool start_play, size_t offset) |
1956 | { | 1956 | { |
1957 | filling = STATE_FILLING; | ||
1958 | trigger_cpu_boost(); | 1957 | trigger_cpu_boost(); |
1959 | 1958 | ||
1960 | /* No need to rebuffer if there are track skips pending. */ | 1959 | /* No need to rebuffer if there are track skips pending, |
1961 | if (ci.new_track != 0) | 1960 | * however don't cancel buffering on skipping while filling. */ |
1961 | if (ci.new_track != 0 && filling != STATE_FILLING) | ||
1962 | return; | 1962 | return; |
1963 | filling = STATE_FILLING; | ||
1963 | 1964 | ||
1964 | /* Must reset the buffer before use if trashed or voice only - voice | 1965 | /* Must reset the buffer before use if trashed or voice only - voice |
1965 | file size shouldn't have changed so we can go straight from | 1966 | file size shouldn't have changed so we can go straight from |