summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Wilgus <wilgus.william@gmail.com>2021-03-05 00:11:08 -0500
committerWilliam Wilgus <wilgus.william@gmail.com>2021-03-05 00:11:08 -0500
commit925dc59126aa6cf206da3e186b4ff98470fc0f31 (patch)
tree0b602d40bde89de1b46197bd874dfd64cb826ade
parent895ed92496408b538f2dc58a07d4e5ad56d24560 (diff)
downloadrockbox-925dc59126aa6cf206da3e186b4ff98470fc0f31.tar.gz
rockbox-925dc59126aa6cf206da3e186b4ff98470fc0f31.tar.bz2
rockbox-925dc59126aa6cf206da3e186b4ff98470fc0f31.zip
OOM on Audio_Reset_Buffer
Allow the talk file to be unloaded Change-Id: I7633c213f1bf7135894aed43171ea683e2867954
-rw-r--r--apps/playback.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 5419888c27..c60468a7dd 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -993,6 +993,8 @@ static void audio_reset_buffer(void)
core_free(audiobuf_handle);
audiobuf_handle = 0;
}
+ if (core_allocatable() < (1 << 10))
+ talk_buffer_set_policy(TALK_BUFFER_LOOSE); /* back off voice buffer */
audiobuf_handle = core_alloc_maximum("audiobuf", &filebuflen, &ops);
if (audiobuf_handle > 0)