summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorStéphane Doyon <s.doyon@videotron.ca>2008-07-15 14:06:11 +0000
committerStéphane Doyon <s.doyon@videotron.ca>2008-07-15 14:06:11 +0000
commitc893affeefa35975c916a222d20a989f31555646 (patch)
tree72db68190ff77e70e0d9ffc0df4753a24b2261e1 /apps/playback.c
parent4aafed43d40d72315ad314b71737b169f8dbdf22 (diff)
downloadrockbox-c893affeefa35975c916a222d20a989f31555646.tar.gz
rockbox-c893affeefa35975c916a222d20a989f31555646.zip
Accept FS#8918: Voice multiple thumbnails and talk race fixes.
-Allows loading multiple thumbnails back-to-back in the one thumbnail buffer. -Mutex to prevent race conditions with talk queue indices and thumbnail buffer state. -Synchronous shutup. -Shutup is a noop if no voice is queued. -mp3_play_stop() does nothing until the audio thread is ready. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18046 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 937bf05394..daa9ab3f2e 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -2599,13 +2599,7 @@ void audio_init(void)
2599 2599
2600} /* audio_init */ 2600} /* audio_init */
2601 2601
2602void audio_wait_for_init(void) 2602bool audio_is_thread_ready(void)
2603{ 2603{
2604 /* audio thread will only set this once after it finished the final 2604 return audio_thread_ready;
2605 * audio hardware init so this little construct is safe - even
2606 * cross-core. */
2607 while (!audio_thread_ready)
2608 {
2609 sleep(0);
2610 }
2611} 2605}