From 77cb50170e6647a3b9d7ce41f7ed52ac991a7213 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 19 Feb 2014 14:58:06 +0000 Subject: [PATCH] Removed initial wait for USB speed from decouple before g_numUsbChanXX is set. This would break mixer on initial startup if USB not connected. This should be okay since g_numUsbChan is set on SET_CHANNEL_COUNT --- module_usb_audio/usb_buffer/decouple.xc | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/module_usb_audio/usb_buffer/decouple.xc b/module_usb_audio/usb_buffer/decouple.xc index 0e277b3b..926fad4f 100644 --- a/module_usb_audio/usb_buffer/decouple.xc +++ b/module_usb_audio/usb_buffer/decouple.xc @@ -736,21 +736,6 @@ void decouple(chanend c_mix_out, } #endif - { - int usb_speed = 0; - - while(usb_speed == 0) - { - GET_SHARED_GLOBAL(usb_speed, g_curUsbSpeed); - } - - if(usb_speed == XUD_SPEED_FS) - { - g_numUsbChanOut = NUM_USB_CHAN_OUT_FS; - g_numUsbChanIn = NUM_USB_CHAN_IN_FS; - } - } - while(1) { int tmp; @@ -865,6 +850,8 @@ void decouple(chanend c_mix_out, SET_SHARED_GLOBAL(totalSampsToWrite, 0); SET_SHARED_GLOBAL(g_aud_to_host_buffer, g_aud_to_host_zeros); + // TODO Set size of zero buffer here + SET_SHARED_GLOBAL(g_freqChange, 0); ENABLE_INTERRUPTS(); }