summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/talk.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/apps/talk.c b/apps/talk.c
index 9e46218187..2dcaf91420 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -210,11 +210,20 @@ static int move_callback(int handle, void *current, void *new)
210 210
211static int clip_shrink_callback(int handle, unsigned hints, void *start, size_t old_size) 211static int clip_shrink_callback(int handle, unsigned hints, void *start, size_t old_size)
212{ 212{
213 (void)start;(void)old_size; 213 (void)start;(void)old_size;(void)hints;
214 214
215#if (!defined(TALK_PARTIAL_LOAD) || (MEMORYSIZE > 2))
216 /* on low-mem and when the voice buffer size is not limited (i.e.
217 * on 2MB HWCODEC) we effectively own the entire buffer because
218 * the voicefile takes up all RAM. This blocks other Rockbox parts
219 * from allocating, especially during bootup. Therefore always give
220 * up the buffer and reload when clips are played back. On high-mem
221 * or when the clip buffer is limited to a few 100K this provision is
222 * not necessary. */
215 if (LIKELY(!talk_handle_locked) 223 if (LIKELY(!talk_handle_locked)
216 && give_buffer_away 224 && give_buffer_away
217 && (hints & BUFLIB_SHRINK_POS_MASK) == BUFLIB_SHRINK_POS_MASK) 225 && (hints & BUFLIB_SHRINK_POS_MASK) == BUFLIB_SHRINK_POS_MASK)
226#endif
218 { 227 {
219 talk_handle = core_free(handle); 228 talk_handle = core_free(handle);
220 return BUFLIB_CB_OK; 229 return BUFLIB_CB_OK;