I'm not sure that this is the right forum for this issue.... but for now -
Hi,
I'm using LoudnessEnhancer audio effect for voice calls.
I've found out that on a long call (few hours) the output volume is slowly goes down, until it's very hard to hear anything.
After digging into the code I think the problem is in the DRC module (dynamic_range_compression.cpp).
When monitoring "compressor_gain_" we can see that its maximal value decreases in time (starts at 1.0).
I think the reason for that is the math-limitations of the processor compared to the source code (the theoretical algorithm).
E.g. - the machine cannot truly handle 0.008333333333333333217685101601546193705871701240539550781250f that the Taylor approximation function is using.
A workaround for this issue is something like -
@@
-121,6 +121,8 @@ void AdaptiveDynamicRangeCompression::Compress(float *x1,
float *x2) {
}
compressor_gain_ *=
math::ExpApproximationViaTaylorExpansionOrder5(state_ - prev_state);
+
if ((compressor_gain_ > 0.999f) && (compressor_gain_ < 1.001f))
+
compressor_gain_ = 1.0f;
*x1 *= compressor_gain_;
Is it a known issue?
Thanks,
Naaman