diff options
author | Thomas Martitz <kugel@rockbox.org> | 2013-12-24 01:16:10 +0100 |
---|---|---|
committer | Thomas Martitz <kugel@rockbox.org> | 2013-12-24 01:16:10 +0100 |
commit | 5827e41904b2e3de7d5b7e53a8e55f35197e1add (patch) | |
tree | da4dc70419b3b45b46cf7e88fe8301e275cd794a /apps | |
parent | d2ae832eef3e91c1a188b697d88ea6cffab0b6bf (diff) | |
download | rockbox-5827e41904b2e3de7d5b7e53a8e55f35197e1add.tar.gz rockbox-5827e41904b2e3de7d5b7e53a8e55f35197e1add.zip |
hwcodec: core_alloc_maximum() returned 0 bytes if talk.c controls the audio buffer.
On hwcodec talk.c has the entire audio buffer (not just parts of it), therefore
it must give up everything and cannot count on core_alloc_maximum() to return
the remaining space. This is equivalent to it was handled before 22e802e.
You could probaby do smarter and shrink for example the .talk clip buffer
but is it really worth it?
Change-Id: Idc3431c59fb41b05338559c615093358c5d8ed9b
Diffstat (limited to 'apps')
-rw-r--r-- | apps/talk.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/apps/talk.c b/apps/talk.c index 9343661181..8979952103 100644 --- a/apps/talk.c +++ b/apps/talk.c | |||
@@ -875,6 +875,11 @@ bool talk_voice_required(void) | |||
875 | /* somebody else claims the mp3 buffer, e.g. for regular play/record */ | 875 | /* somebody else claims the mp3 buffer, e.g. for regular play/record */ |
876 | void talk_buffer_set_policy(int policy) | 876 | void talk_buffer_set_policy(int policy) |
877 | { | 877 | { |
878 | #if CONFIG_CODEC != SWCODEC | ||
879 | /* always grab the voice buffer for now */ | ||
880 | (void) policy; | ||
881 | give_buffer_away = true; | ||
882 | #else | ||
878 | switch(policy) | 883 | switch(policy) |
879 | { | 884 | { |
880 | case TALK_BUFFER_DEFAULT: | 885 | case TALK_BUFFER_DEFAULT: |
@@ -882,6 +887,7 @@ void talk_buffer_set_policy(int policy) | |||
882 | case TALK_BUFFER_LOOSE: give_buffer_away = true; break; | 887 | case TALK_BUFFER_LOOSE: give_buffer_away = true; break; |
883 | default: DEBUGF("Ignoring unknown policy\n"); break; | 888 | default: DEBUGF("Ignoring unknown policy\n"); break; |
884 | } | 889 | } |
890 | #endif | ||
885 | } | 891 | } |
886 | 892 | ||
887 | /* play a voice ID from voicefile */ | 893 | /* play a voice ID from voicefile */ |