summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/playback.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/playback.c b/apps/playback.c
index 5cf059f..92fc4a5 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -1839,7 +1839,10 @@ static void codec_thread(void)
/* Wait for the audio to stop playing before
* triggering the WPS exit */
while(pcm_is_playing())
- sleep(1);
+ {
+ CUR_TI->id3.elapsed = CUR_TI->id3.length - pcmbuf_get_latency();
+ yield();
+ }
LOGFQUEUE("codec > audio Q_AUDIO_STOP");
queue_post(&audio_queue, Q_AUDIO_STOP, 0);
break;