diff --git a/module_usb_audio/usb_buffer/decouple.xc b/module_usb_audio/usb_buffer/decouple.xc index e338ea35..d6985890 100644 --- a/module_usb_audio/usb_buffer/decouple.xc +++ b/module_usb_audio/usb_buffer/decouple.xc @@ -150,15 +150,15 @@ int g_maxPacketSize = MAX_DEVICE_AUD_PACKET_SIZE_IN_FS; #pragma unsafe arrays void handle_audio_request(chanend c_mix_out) { - int outSamps; int space_left; /* Input word that triggered interrupt and handshake back */ unsigned underflowSample = inuint(c_mix_out); #if (NUM_USB_CHAN_OUT == 0) - outuint(c_mix_out, 0); + outuint(c_mix_out, underflowSample); #else + int outSamps; if(outUnderflow) { #pragma xta endpoint "out_underflow" diff --git a/module_usb_audio/usb_buffer/usb_buffer.xc b/module_usb_audio/usb_buffer/usb_buffer.xc index 861abb51..44119571 100644 --- a/module_usb_audio/usb_buffer/usb_buffer.xc +++ b/module_usb_audio/usb_buffer/usb_buffer.xc @@ -180,7 +180,9 @@ void buffer(register chanend c_aud_out, register chanend c_aud_in, unsigned expected_fb = 0; #endif +#if (NUM_USB_CHAN_OUT > 0) xc_ptr aud_from_host_buffer = 0; +#endif #ifdef MIDI xc_ptr midi_from_host_buffer = array_to_xc_ptr(g_midi_from_host_buffer);