From c893affeefa35975c916a222d20a989f31555646 Mon Sep 17 00:00:00 2001 From: Stéphane Doyon Date: Tue, 15 Jul 2008 14:06:11 +0000 Subject: 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 --- apps/playback.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'apps/playback.c') 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) } /* audio_init */ -void audio_wait_for_init(void) +bool audio_is_thread_ready(void) { - /* audio thread will only set this once after it finished the final - * audio hardware init so this little construct is safe - even - * cross-core. */ - while (!audio_thread_ready) - { - sleep(0); - } + return audio_thread_ready; } -- cgit v1.2.3