1
0
Fork 0
forked from len0rd/rockbox

OOM on Audio_Reset_Buffer

Allow the talk file to be unloaded

Change-Id: I7633c213f1bf7135894aed43171ea683e2867954
This commit is contained in:
William Wilgus 2021-03-05 00:11:08 -05:00
parent 895ed92496
commit 925dc59126

View file

@ -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)