diff options
| author | Miika Pekkarinen <miipekk@ihme.org> | 2005-08-20 18:55:15 +0000 |
|---|---|---|
| committer | Miika Pekkarinen <miipekk@ihme.org> | 2005-08-20 18:55:15 +0000 |
| commit | e3dc61e0b9393d263240a716e2bf5ac63ebff80c (patch) | |
| tree | cfa8e3f5c0ba9468e8a749f8ba38e8e8ea49cc1b /apps | |
| parent | fa0cecf5a9fe309e445f6146c2c49c3205ebc85e (diff) | |
| download | rockbox-e3dc61e0b9393d263240a716e2bf5ac63ebff80c.zip rockbox-e3dc61e0b9393d263240a716e2bf5ac63ebff80c.tar.gz rockbox-e3dc61e0b9393d263240a716e2bf5ac63ebff80c.tar.bz2 rockbox-e3dc61e0b9393d263240a716e2bf5ac63ebff80c.tar.xz | |
Preparations to fix the usb mode (something is still preventing it from
working).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7363 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
| -rw-r--r-- | apps/playback.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/apps/playback.c b/apps/playback.c index 8829757..e340938 100644 --- a/apps/playback.c +++ b/apps/playback.c @@ -1454,7 +1454,9 @@ bool codec_request_next_track_callback(void) { if (current_codec == CODEC_IDX_VOICE) { voice_remaining = 0; - return !ci_voice.stop_codec; + /* Terminate the codec if they are messages waiting on the queue or + core has been requested the codec to be terminated. */ + return !ci_voice.stop_codec && queue_empty(&voice_codec_queue); } if (ci.stop_codec || !playing) @@ -1679,7 +1681,7 @@ void audio_thread(void) #ifndef SIMULATOR case SYS_USB_CONNECTED: - logf("USB Connection"); + logf("USB: Audio core"); audio_stop_playback(); usb_acknowledge(SYS_USB_CONNECTED_ACK); usb_wait_for_disconnect(&audio_queue); @@ -1737,6 +1739,12 @@ void codec_thread(void) #ifndef SIMULATOR case SYS_USB_CONNECTED: + while (voice_codec_loaded) { + if (current_codec != CODEC_IDX_VOICE) + swap_codec(); + sleep(1); + } + logf("USB: Audio codec"); usb_acknowledge(SYS_USB_CONNECTED_ACK); usb_wait_for_disconnect(&codec_queue); break ; @@ -1816,6 +1824,7 @@ void voice_codec_thread(void) #ifndef SIMULATOR case SYS_USB_CONNECTED: + logf("USB: Voice codec"); usb_acknowledge(SYS_USB_CONNECTED_ACK); usb_wait_for_disconnect(&voice_codec_queue); break ; |