diff --git a/module_usb_audio/endpoint0/endpoint0.c b/module_usb_audio/endpoint0/endpoint0.c index 89963257..8213e87f 100755 --- a/module_usb_audio/endpoint0/endpoint0.c +++ b/module_usb_audio/endpoint0/endpoint0.c @@ -76,10 +76,10 @@ unsigned char mixer1Crossbar[18]; short mixer1Weights[18*8]; unsigned char channelMap[NUM_USB_CHAN_OUT + NUM_USB_CHAN_IN + MAX_MIX_COUNT]; -#if NUM_USB_CHAN_OUT > 0 +#if (NUM_USB_CHAN_OUT > 0) unsigned char channelMapAud[NUM_USB_CHAN_OUT]; #endif -#if NUM_USB_CHAN_IN > 0 +#if (NUM_USB_CHAN_IN > 0) unsigned char channelMapUsb[NUM_USB_CHAN_IN]; #endif unsigned char mixSel[MIX_INPUTS]; @@ -337,7 +337,7 @@ void Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl, } } } -#if defined(OUTPUT) && defined(INPUT) +#if (NUM_USB_CHAN_OUT > 0) && (NUM_USB_CHAN_IN > 0) /* Check for stream start stop on output and input audio interfaces */ if(sp.wValue && !g_interfaceAlt[1] && !g_interfaceAlt[2]) { @@ -354,7 +354,7 @@ void Endpoint0(chanend c_ep0_out, chanend c_ep0_in, chanend c_audioControl, /* if input stop and input running and output not running */ UserAudioStreamStop(); } -#elif defined(OUTPUT) || defined(INPUT) +#elif (NUM_USB_CHAN_OUT > 0) || (NUM_USB_CHAN_IN > 0) if(sp.wValue && (!g_interfaceAlt[1])) { /* if start and not currently running */ diff --git a/module_usb_audio/usb_buffer/decouple.xc b/module_usb_audio/usb_buffer/decouple.xc index 092396cd..4ecfd97e 100644 --- a/module_usb_audio/usb_buffer/decouple.xc +++ b/module_usb_audio/usb_buffer/decouple.xc @@ -648,7 +648,7 @@ void decouple(chanend c_mix_out, int aud_from_host_flag=0; xc_ptr released_buffer; #endif -#if (NUM_USB_CHAN_OUT > 0) +#if (NUM_USB_CHAN_IN > 0) int aud_to_host_flag = 0; #endif @@ -721,7 +721,7 @@ void decouple(chanend c_mix_out, XUD_SetReady_OutPtr(aud_from_host_usb_ep, g_aud_from_host_wrptr+4); #endif -#if (NUM_USB_CHAN_OUT > 0) +#if (NUM_USB_CHAN_IN > 0) /* Wait for usb_buffer to set up */ while(!aud_to_host_flag) {