Fix build issue with volume processing in mixer (missing xc_ptr func)

This commit is contained in:
Ross Owen
2023-02-17 12:10:51 +00:00
parent 0c6d947e67
commit c578bb92d5

View File

@@ -238,10 +238,9 @@ static inline void GetSamplesFromHost(chanend c)
h |= (l >>29)& 0x7; // Note: This step is not required if we assume sample depth is 24bit (rather than 32bit) h |= (l >>29)& 0x7; // Note: This step is not required if we assume sample depth is 24bit (rather than 32bit)
// Note: We need all 32bits for Native DSD // Note: We need all 32bits for Native DSD
#endif #endif
write_via_xc_ptr_indexed(samples_array, i, h); sample = h;
#else
ptr_samples[i] = sample;
#endif #endif
ptr_samples[i] = sample;
} }
} }
#endif #endif
@@ -332,7 +331,7 @@ static inline void GetSamplesFromDevice(chanend c)
#endif #endif
#if (IN_VOLUME_IN_MIXER && IN_VOLUME_AFTER_MIX) #if (IN_VOLUME_IN_MIXER && IN_VOLUME_AFTER_MIX)
/* Read relevant multiplier */ /* Volume processing - read relevant multiplier */
unsafe unsafe
{ {
mult = multIn[i]; mult = multIn[i];
@@ -340,16 +339,14 @@ static inline void GetSamplesFromDevice(chanend c)
/* Do the multiply */ /* Do the multiply */
{h, l} = macs(mult, sample, 0, 0); {h, l} = macs(mult, sample, 0, 0);
h <<=3; h <<= 3;
write_via_xc_ptr_indexed(samples_array, XUA_MIXER_OFFSET_IN+i, h); sample = h;
#else #endif
/* No volume processing */
unsafe unsafe
{ {
assert((XUA_MIXER_OFFSET_IN + i) < (NUM_USB_CHAN_IN + NUM_USB_CHAN_OUT)); assert((XUA_MIXER_OFFSET_IN + i) < (NUM_USB_CHAN_IN + NUM_USB_CHAN_OUT));
ptr_samples[XUA_MIXER_OFFSET_IN + i] = sample; ptr_samples[XUA_MIXER_OFFSET_IN + i] = sample;
} }
#endif
} }
} }