Have voice_wait wait for the PCM buffer to drain. It can only do this if

playback is NOT in progress, but that is indeed the case for the only caller
(shutting down message).


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15790 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Stéphane Doyon 2007-11-24 14:21:04 +00:00
parent 3082a40b0a
commit 686b1144ba

View file

@ -181,6 +181,9 @@ void voice_wait(void)
* new clip by the time we wait. This should be resolvable if conditions
* ever require knowing the very clip you requested has finished. */
event_wait(&voice_event, STATE_SIGNALED);
/* Wait for PCM buffer to be exhausted. Works only if not playing. */
while(!playback_is_playing() && pcm_is_playing())
sleep(1);
}
/* Initialize voice thread data that must be valid upon starting and the