- Fixed build issue with !FAST_MIXER

- Fixed issue with !OUT_VOLUME_AFTER_MIX not being respected
This commit is contained in:
Ross Owen
2023-03-13 15:50:45 +00:00
parent 4a84c3e1ec
commit 55a62cf589

View File

@@ -8,17 +8,17 @@
#include "xua_commands.h" #include "xua_commands.h"
#include "dbcalc.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" #include "xc_ptr.h"
#endif #endif
#if (MIXER) #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) #if (OUT_VOLUME_IN_MIXER)
static unsigned int multOut_array[NUM_USB_CHAN_OUT + 1]; static unsigned int multOut_array[NUM_USB_CHAN_OUT + 1];
unsafe 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); read_via_xc_ptr_indexed(source, mixMap, i);
sample = samples[source]; sample = samples[source];
read_via_xc_ptr_indexed(weight, mult, i); read_via_xc_ptr_indexed(weight, mult, i);
{h,l} = macs(sample, weight, h, l); {h,l} = macs(sample, weight, h, l);
} }
@@ -211,7 +213,7 @@ static inline void GetSamplesFromHost(chanend c)
for (int i=0; i<NUM_USB_CHAN_OUT; i++) for (int i=0; i<NUM_USB_CHAN_OUT; i++)
unsafe { unsafe {
int sample, x; int sample, x;
#if (OUT_VOLUME_IN_MIXER && OUT_VOLUME_AFTER_MIX) #if (OUT_VOLUME_IN_MIXER && !OUT_VOLUME_AFTER_MIX)
int mult; int mult;
int h; int h;
unsigned l; unsigned l;
@@ -228,7 +230,7 @@ static inline void GetSamplesFromHost(chanend c)
} }
#endif #endif
#if (OUT_VOLUME_IN_MIXER && OUT_VOLUME_AFTER_MIX) #if (OUT_VOLUME_IN_MIXER && !OUT_VOLUME_AFTER_MIX)
#warning OUT Vols in mixer, BEFORE mix & map #warning OUT Vols in mixer, BEFORE mix & map
mult = multOut[i]; mult = multOut[i];
{h, l} = macs(mult, sample, 0, 0); {h, l} = macs(mult, sample, 0, 0);