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
This commit is contained in:
Michael Sevakis 2007-12-11 14:04:03 +00:00
parent 7ab63e3f1b
commit a9d73e5e68

View file

@ -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 */