summaryrefslogtreecommitdiff
path: root/apps/playback.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2011-11-17 18:40:00 +0000
committerThomas Martitz <kugel@rockbox.org>2011-11-17 18:40:00 +0000
commit1645c148e35becff9668cc541be5c850153370eb (patch)
treeff4af71980a290ed1877facee590b39280940c45 /apps/playback.c
parent2a8eacdbfc5d98b016c480ddaddff100301f721f (diff)
downloadrockbox-1645c148e35becff9668cc541be5c850153370eb.tar.gz
rockbox-1645c148e35becff9668cc541be5c850153370eb.zip
Simulate usb plugging on the sim better using sim_tasks.
Now all threads need to ack the connection like on real target, dircache is unloaded and playback stops accordingly. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31009 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/playback.c')
-rw-r--r--apps/playback.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/apps/playback.c b/apps/playback.c
index d591998bec..b20237cc7c 100644
--- a/apps/playback.c
+++ b/apps/playback.c
@@ -190,9 +190,7 @@ static enum filling_state
190 STATE_FINISHED, /* all remaining tracks are fully buffered */ 190 STATE_FINISHED, /* all remaining tracks are fully buffered */
191 STATE_ENDING, /* audio playback is ending */ 191 STATE_ENDING, /* audio playback is ending */
192 STATE_ENDED, /* audio playback is done */ 192 STATE_ENDED, /* audio playback is done */
193#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
194 STATE_USB, /* USB mode, ignore most messages */ 193 STATE_USB, /* USB mode, ignore most messages */
195#endif
196} filling = STATE_IDLE; 194} filling = STATE_IDLE;
197 195
198/* Track info - holds information about each track in the buffer */ 196/* Track info - holds information about each track in the buffer */
@@ -3129,7 +3127,6 @@ static void audio_thread(void)
3129 break; 3127 break;
3130#endif /* AUDIO_HAVE_RECORDING */ 3128#endif /* AUDIO_HAVE_RECORDING */
3131 3129
3132#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
3133 case SYS_USB_CONNECTED: 3130 case SYS_USB_CONNECTED:
3134 LOGFQUEUE("audio < SYS_USB_CONNECTED"); 3131 LOGFQUEUE("audio < SYS_USB_CONNECTED");
3135 audio_stop_playback(); 3132 audio_stop_playback();
@@ -3139,7 +3136,6 @@ static void audio_thread(void)
3139 filling = STATE_USB; 3136 filling = STATE_USB;
3140 usb_acknowledge(SYS_USB_CONNECTED_ACK); 3137 usb_acknowledge(SYS_USB_CONNECTED_ACK);
3141 break; 3138 break;
3142#endif /* (CONFIG_PLATFORM & PLATFORM_NATIVE) */
3143 3139
3144 case SYS_TIMEOUT: 3140 case SYS_TIMEOUT:
3145 LOGFQUEUE_SYS_TIMEOUT("audio < SYS_TIMEOUT"); 3141 LOGFQUEUE_SYS_TIMEOUT("audio < SYS_TIMEOUT");