From 896d674a30cb620206a7cab8ca95abd838041fd7 Mon Sep 17 00:00:00 2001 From: Russell Date: Thu, 17 Nov 2011 16:50:44 +0000 Subject: [PATCH] Manually apply: [PATCH 04/19] Tidy up for old INPUT and OUTPUT defines. Now based on channel count defs --- module_usb_aud_shared/devicedefines.h | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/module_usb_aud_shared/devicedefines.h b/module_usb_aud_shared/devicedefines.h index 1e7ff0ad..214dda69 100644 --- a/module_usb_aud_shared/devicedefines.h +++ b/module_usb_aud_shared/devicedefines.h @@ -9,6 +9,27 @@ #include "customdefines.h" +/* Tidy up historical INPUT/OUTPUT defines. INPUT/OUTPUT now enabled based on channel count defines */ +#if !defined(NUM_USB_CHAN_IN) + #error NUM_USB_CHAN_IN must be defined! +#else + #if (NUM_USB_CHAN_IN == 0) + #undef INPUT + #else + #define INPUT 1 + #endif +#endif + +#if !defined(NUM_USB_CHAN_OUT) + #error NUM_USB_CHAN_OUT must be defined! +#else + #if (NUM_USB_CHAN_OUT == 0) + #undef OUTPUT + #else + #define OUTPUT 1 + #endif +#endif + #if defined(IO_EXPANSION) && (IO_EXPANSION == 0) #undef IO_EXPANSION #endif