mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
talk: Force-shutdown the voice system before loading a new voice
Otherwise we might actually be talking when we try to switch, or otherwise trash the state of the running talk thread, leading to memory corruption or an outright crash (This fixes a panic observed on the xDuoo X3) Change-Id: I78e4232085c5c160c9ee4f18167dad8dad2b9287
This commit is contained in:
parent
0c4ae417d5
commit
09f40e266b
1 changed files with 3 additions and 0 deletions
|
@ -919,6 +919,9 @@ void talk_init(void)
|
||||||
#endif /* CONFIG_CODEC == SWCODEC */
|
#endif /* CONFIG_CODEC == SWCODEC */
|
||||||
mutex_init(&read_buffer_mutex);
|
mutex_init(&read_buffer_mutex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
talk_force_shutup(); /* In case we have something speaking! */
|
||||||
|
|
||||||
talk_initialized = true;
|
talk_initialized = true;
|
||||||
strlcpy((char *)last_lang, (char *)global_settings.lang_file,
|
strlcpy((char *)last_lang, (char *)global_settings.lang_file,
|
||||||
MAX_FILENAME);
|
MAX_FILENAME);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue