From 943a8cd1d92b2cb45a2e352015c1896a2d6cb01e Mon Sep 17 00:00:00 2001 From: mid <> Date: Sat, 10 May 2025 19:16:59 +0300 Subject: [PATCH] Do not tanh the final audio --- src/k3mix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/k3mix.c b/src/k3mix.c index 228b74c..7d3067b 100644 --- a/src/k3mix.c +++ b/src/k3mix.c @@ -351,7 +351,7 @@ __attribute__((optimize("Ofast"))) static void k3MixDoYourThang(size_t sampleCou } else i++; } - for(size_t i = 0; i < sampleCount * FinalChannels; i += 4) { + /*for(size_t i = 0; i < sampleCount * FinalChannels; i += 4) { // Compute tanh approximation x*(27+x*x)/(27+9*x*x) float *ptr = FinalData + i; @@ -363,7 +363,7 @@ __attribute__((optimize("Ofast"))) static void k3MixDoYourThang(size_t sampleCou __m128 denom = _mm_add_ps(_mm_set1_ps(27), _mm_mul_ps(_mm_set1_ps(9), xx)); _mm_storeu_ps(ptr, _mm_div_ps(numer, denom)); - } + }*/ // The accuracy isn't worth the function call per sample /*for(size_t i = 0; i < sampleCount * FinalChannels; i++) {