From a6ff04830d748ad8bb878845e0953cf44aa4e690 Mon Sep 17 00:00:00 2001 From: pio Date: Wed, 21 Aug 2024 19:51:55 +0200 Subject: [PATCH] channel bug fixes --- src/effect_gainStereo_F32.h | 2 +- src/filter_DCblockerStereo_F32.h | 4 ++-- src/switch_selectorStereo_F32.h | 4 ---- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/effect_gainStereo_F32.h b/src/effect_gainStereo_F32.h index 99329a4..f00091e 100644 --- a/src/effect_gainStereo_F32.h +++ b/src/effect_gainStereo_F32.h @@ -78,7 +78,7 @@ public: { float32_t gL, gR; pan = constrain(p, 0.0f, 1.0f); - mix_pwr(pan, &panR, &panL); + mix_pwr(pan, &panL, &panR); gL = panL * gain; gR = panR * gain; diff --git a/src/filter_DCblockerStereo_F32.h b/src/filter_DCblockerStereo_F32.h index 42d7e72..dafca89 100644 --- a/src/filter_DCblockerStereo_F32.h +++ b/src/filter_DCblockerStereo_F32.h @@ -130,8 +130,8 @@ public: xRegR = _xRegR; yRegR = _yRegR; - AudioStream_F32::transmit(blockL, 0); // send blockL on both output channels - AudioStream_F32::transmit(blockL, 1); + AudioStream_F32::transmit(blockL, 0); + AudioStream_F32::transmit(blockR, 1); AudioStream_F32::release(blockL); AudioStream_F32::release(blockR); diff --git a/src/switch_selectorStereo_F32.h b/src/switch_selectorStereo_F32.h index aeffc17..1d01cd4 100644 --- a/src/switch_selectorStereo_F32.h +++ b/src/switch_selectorStereo_F32.h @@ -50,14 +50,10 @@ public: blockL = AudioStream_F32::receiveWritable_f32(0); blockR = AudioStream_F32::receiveWritable_f32(1); - if (!blockL || !blockR) { if (blockL) AudioStream_F32::release(blockL); if (blockR) AudioStream_F32::release(blockR); - - - return; } switch(mode)