From 5d79430cff3d7a037c357bcd97ce62892733e2cb Mon Sep 17 00:00:00 2001 From: Markus Schmidt Date: Mon, 10 Feb 2014 05:13:10 +0100 Subject: [PATCH] Vocoder: Balance working --- src/modules_filter.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules_filter.cpp b/src/modules_filter.cpp index 6d89e72..94bacfb 100644 --- a/src/modules_filter.cpp +++ b/src/modules_filter.cpp @@ -1010,8 +1010,10 @@ uint32_t vocoder_audio_module::process(uint32_t offset, uint32_t numsamples, uin cR_ += mR_ * *params[param_mod0 + i * band_params]; // Balance - cL_ *= *params[param_pan0] > 0 ? -*params[param_pan0] + 1 : 1; - cR_ *= *params[param_pan0] < 0 ? *params[param_pan0] + 1 : 1; + cL_ *= (*params[param_pan0 + i * band_params] > 0 + ? -*params[param_pan0 + i * band_params] + 1 : 1); + cR_ *= (*params[param_pan0 + i * band_params] < 0 + ? *params[param_pan0 + i * band_params] + 1 : 1); // add to outputs with proc level pL += cL_ * *params[param_proc]; -- 2.11.4.GIT