add preset buttons (use macro) + change name of MONO channel pseudo-gain - release

This commit is contained in:
Philippe G
2021-02-10 23:52:53 -08:00
parent ee35e1dc99
commit ed00f029a6
4 changed files with 34 additions and 166 deletions

View File

@@ -364,13 +364,13 @@ inline
void _apply_gain(struct buffer *outputbuf, frames_t count, s32_t gainL, s32_t gainR) {
if (gainL == FIXED_ONE && gainR == FIXED_ONE) {
return;
} else if (gainL == MONO_MUTED) {
} else if (gainL == COPY_MONO) {
ISAMPLE_T *ptr = (ISAMPLE_T *)(void *)outputbuf->readp + 1;
while (count--) {
*(ptr - 1) = *ptr = gain(gainR, *ptr);
ptr += 2;
}
} else if (gainR == MONO_MUTED) {
} else if (gainR == COPY_MONO) {
ISAMPLE_T *ptr = (ISAMPLE_T *)(void *)outputbuf->readp;
while (count--) {
*(ptr + 1) = *ptr = gain(gainL, *ptr);