From ef4a080da4179d016b50a26f1a7519db30c22ed2 Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Tue, 13 Mar 2007 12:14:11 +0000 Subject: [PATCH] SWCODEC/Voice: Just one more adjustment and all should be good again. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12749 a1c6a512-1295-4272-9138-f99709370657 --- apps/playback.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/apps/playback.c b/apps/playback.c index 32f4a3b43c..0680c5f453 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -3353,6 +3353,10 @@ static void audio_reset_buffer(size_t pcmbufsize) logf("audio_reset_buffer"); logf(" size:%08X", pcmbufsize); + /* If the setup of anything allocated before the file buffer is + changed, do check the adjustments after the buffer_alloc call + as it will likely be affected and need sliding over */ + /* Initially set up file buffer as all space available */ malloc_buf = audiobuf + talk_get_bufsize(); /* Align the malloc buf to line size. Especially important to cf @@ -3390,6 +3394,7 @@ static void audio_reset_buffer(size_t pcmbufsize) /* buffer_alloc moves audiobuf; this is safe because only the end * has been touched so far in this function and the address of * filebuf + filebuflen is not changed */ + malloc_buf += CODEC_IRAM_SIZE; filebuf += CODEC_IRAM_SIZE; filebuflen -= CODEC_IRAM_SIZE; }