From e3fd1601d73bdcd918b4c55bb03b7f70fa25c8ee Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Thu, 24 Aug 2017 10:12:07 +0100 Subject: [PATCH] Cleaned up some build warnings when NUM_USB_CHAN_OUT = 0 --- module_usb_audio/usb_buffer/decouple.xc | 4 ++-- module_usb_audio/usb_buffer/usb_buffer.xc | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) 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);