summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorStéphane Doyon <s.doyon@videotron.ca>2007-11-24 14:21:04 +0000
committerStéphane Doyon <s.doyon@videotron.ca>2007-11-24 14:21:04 +0000
commit686b1144baaf3ae9fec876a5b8a11a90ab468ec6 (patch)
tree84008f64876268652f54b0f33fd869a3a07b3eb2 /apps
parent3082a40b0a919c68fe03748e65e02d768cd3e4c9 (diff)
downloadrockbox-686b1144baaf3ae9fec876a5b8a11a90ab468ec6.tar.gz
rockbox-686b1144baaf3ae9fec876a5b8a11a90ab468ec6.zip
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
Diffstat (limited to 'apps')
-rw-r--r--apps/voice_thread.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/voice_thread.c b/apps/voice_thread.c
index 87702339c8..3782ae8aac 100644
--- a/apps/voice_thread.c
+++ b/apps/voice_thread.c
@@ -181,6 +181,9 @@ void voice_wait(void)
181 * new clip by the time we wait. This should be resolvable if conditions 181 * new clip by the time we wait. This should be resolvable if conditions
182 * ever require knowing the very clip you requested has finished. */ 182 * ever require knowing the very clip you requested has finished. */
183 event_wait(&voice_event, STATE_SIGNALED); 183 event_wait(&voice_event, STATE_SIGNALED);
184 /* Wait for PCM buffer to be exhausted. Works only if not playing. */
185 while(!playback_is_playing() && pcm_is_playing())
186 sleep(1);
184} 187}
185 188
186/* Initialize voice thread data that must be valid upon starting and the 189/* Initialize voice thread data that must be valid upon starting and the