From 70276c3237fa5fe44dc5495a0ff36d48ad9b5e72 Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Wed, 15 Jan 2014 17:22:28 +0000 Subject: [PATCH] Fixed build issue when NUM_USB_CHAN_IN or NUM_USB_CHAN_OUT set to 0 and MIXER set to 1 (#15096) --- module_usb_audio/audio.xc | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/module_usb_audio/audio.xc b/module_usb_audio/audio.xc index 72b8674f..5caedd27 100755 --- a/module_usb_audio/audio.xc +++ b/module_usb_audio/audio.xc @@ -240,6 +240,7 @@ static inline void doI2SClocks(unsigned divide) #endif #else /* ifndef MIXER */ +#if NUM_USB_CHAN_OUT > 0 if(underflow) { #pragma loop unroll @@ -260,12 +261,15 @@ static inline void doI2SClocks(unsigned divide) samplesOut[i] = tmp; } } +#endif +#if NUM_USB_CHAN_IN > 0 #pragma loop unroll for(int i = 0; i < NUM_USB_CHAN_IN; i++) { outuint(c_out, samplesIn[i]); } +#endif #endif } @@ -428,7 +432,7 @@ static inline void doI2SClocks(unsigned divide) } #endif #else /* ifndef MIXER */ - +#if NUM_USB_CHAN_OUT > 0 if(underflow) { for(int i = 0; i < NUM_USB_CHAN_OUT; i++) @@ -448,12 +452,14 @@ static inline void doI2SClocks(unsigned divide) samplesOut[i] = tmp; } } - +#endif +#if NUM_USB_CHAN_IN > 0 #pragma loop unroll for(int i = 0; i < NUM_USB_CHAN_IN; i++) { outuint(c_out, samplesIn[i]); } +#endif #endif }