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:
parent
3082a40b0a
commit
686b1144ba
1 changed files with 3 additions and 0 deletions
|
@ -181,6 +181,9 @@ void voice_wait(void)
|
||||||
* new clip by the time we wait. This should be resolvable if conditions
|
* new clip by the time we wait. This should be resolvable if conditions
|
||||||
* ever require knowing the very clip you requested has finished. */
|
* ever require knowing the very clip you requested has finished. */
|
||||||
event_wait(&voice_event, STATE_SIGNALED);
|
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
|
/* Initialize voice thread data that must be valid upon starting and the
|
||||||
|
|
Loading…
Reference in a new issue