Do not tanh the final audio

This commit is contained in:
mid 2025-05-10 19:16:59 +03:00
parent 2c1ee84791
commit 943a8cd1d9

View File

@ -351,7 +351,7 @@ __attribute__((optimize("Ofast"))) static void k3MixDoYourThang(size_t sampleCou
} else i++; } 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) // Compute tanh approximation x*(27+x*x)/(27+9*x*x)
float *ptr = FinalData + i; 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)); __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)); _mm_storeu_ps(ptr, _mm_div_ps(numer, denom));
} }*/
// The accuracy isn't worth the function call per sample // The accuracy isn't worth the function call per sample
/*for(size_t i = 0; i < sampleCount * FinalChannels; i++) { /*for(size_t i = 0; i < sampleCount * FinalChannels; i++) {