From 55a62cf58931f4836b7f37bebced9aa603cd3a9b Mon Sep 17 00:00:00 2001 From: Ross Owen Date: Mon, 13 Mar 2023 15:50:45 +0000 Subject: [PATCH] - Fixed build issue with !FAST_MIXER - Fixed issue with !OUT_VOLUME_AFTER_MIX not being respected --- lib_xua/src/core/mixer/mixer.xc | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lib_xua/src/core/mixer/mixer.xc b/lib_xua/src/core/mixer/mixer.xc index 87499b2f..db19d0d0 100644 --- a/lib_xua/src/core/mixer/mixer.xc +++ b/lib_xua/src/core/mixer/mixer.xc @@ -8,17 +8,17 @@ #include "xua_commands.h" #include "dbcalc.h" -#if defined (LEVEL_METER_HOST) || defined(LEVEL_METER_LEDS) +/* FAST_MIXER has a bit of a nasty implentation but is more efficient */ +#ifndef FAST_MIXER +#define FAST_MIXER (1) +#endif + +#if defined (LEVEL_METER_HOST) || defined(LEVEL_METER_LEDS) || !FAST_MIXER #include "xc_ptr.h" #endif #if (MIXER) -/* FAST_MIXER has a bit of a nasty implentation but is more effcient */ -#ifndef FAST_MIXER -#define FAST_MIXER (1) -#endif - #if (OUT_VOLUME_IN_MIXER) static unsigned int multOut_array[NUM_USB_CHAN_OUT + 1]; unsafe @@ -139,6 +139,8 @@ static inline int doMix(volatile int * unsafe samples, volatile int * unsafe con read_via_xc_ptr_indexed(source, mixMap, i); sample = samples[source]; read_via_xc_ptr_indexed(weight, mult, i); + + {h,l} = macs(sample, weight, h, l); } @@ -211,7 +213,7 @@ static inline void GetSamplesFromHost(chanend c) for (int i=0; i