From a9d73e5e68cdc2c2463813eabdac33a4d7ffd6fe Mon Sep 17 00:00:00 2001 From: Michael Sevakis Date: Tue, 11 Dec 2007 14:04:03 +0000 Subject: A final queue_post in voice_stop via. talk_force_shutup can try stopping PCM too late and interfere PCM playback after plugins init IRAM or calling audio_get_buffer. Send the NULL message to the voice thread to ensure all messages are done. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15911 a1c6a512-1295-4272-9138-f99709370657 --- apps/voice_thread.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'apps') diff --git a/apps/voice_thread.c b/apps/voice_thread.c index 4027fd067b..7bf52d4d0d 100644 --- a/apps/voice_thread.c +++ b/apps/voice_thread.c @@ -173,6 +173,10 @@ void voice_stop(void) /* Unqueue all future clips */ talk_force_shutup(); + /* Wait for any final queue_post to be processed */ + LOGFQUEUE("mp3 >| voice Q_VOICE_NULL"); + queue_send(&voice_queue, Q_VOICE_NULL, 0); + mutex_unlock(&voice_mutex); } /* voice_stop */ -- cgit v1.2.3