summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorMichael Giacomelli <giac2000@hotmail.com>2009-11-21 17:00:38 +0000
committerMichael Giacomelli <giac2000@hotmail.com>2009-11-21 17:00:38 +0000
commitecd9bcf3cb4d9ac1d0a6276ec66f20686d4c24ca (patch)
tree76331752aeff2e70566f39a5244513da0f331929 /apps/playback.c
parent1717217cb852913cc21b044a779cad980564e989 (diff)
downloadrockbox-ecd9bcf3cb4d9ac1d0a6276ec66f20686d4c24ca.tar.gz
rockbox-ecd9bcf3cb4d9ac1d0a6276ec66f20686d4c24ca.zip
Commit FS#10605 - stable playback on low memory swcodec targets by Matthias Schneider. Should allow stable playback on targets with less then 4MB of RAM and sofware decoding such as the Sandisk Clip, c200v2, m200v4 and probably others. Fixes several problems in buffering that occured when the files to be buffered weren't much smaller then the ring buffer size. Fixes a bug where move_handle would corrupt the audio buffer when trying to copy a handle that both wrapped around the highest address in the ring buffer and overlapped part of the source and desination ranges. Moves the decision in playback.c about when to update the current track handle from audio_check_new_track to after the metadata has been buffered. Corrects several other minor pieces of code. I've logged about 100 hours without a crash on various players with this patch but its possible it breaks some combination of players and features I haven't thought to test.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23680 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c
index f0794faf87..ff20172d83 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1549,7 +1549,6 @@ static int audio_check_new_track(void)
1549 /* Move to the new track */ 1549 /* Move to the new track */
1550 track_ridx = (track_ridx + ci.new_track) & MAX_TRACK_MASK; 1550 track_ridx = (track_ridx + ci.new_track) & MAX_TRACK_MASK;
1551 1551
1552 buf_set_base_handle(CUR_TI->audio_hid);
1553 1552
1554 if (automatic_skip) 1553 if (automatic_skip)
1555 { 1554 {
@@ -1904,6 +1903,7 @@ static void audio_thread(void)
1904 case Q_AUDIO_FINISH_LOAD: 1903 case Q_AUDIO_FINISH_LOAD:
1905 LOGFQUEUE("audio < Q_AUDIO_FINISH_LOAD"); 1904 LOGFQUEUE("audio < Q_AUDIO_FINISH_LOAD");
1906 audio_finish_load_track(); 1905 audio_finish_load_track();
1906 buf_set_base_handle(CUR_TI->audio_hid);
1907 break; 1907 break;
1908 1908
1909 case Q_AUDIO_PLAY: 1909 case Q_AUDIO_PLAY: