mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-07-30 16:29:15 +02:00
sqrt of 2?
This commit is contained in:
+1
-1
@@ -73,7 +73,7 @@ float bs412_compress(BS412Compressor* mpx, float sample) {
|
|||||||
|
|
||||||
mpx->gain = fmaxf(0.0f, fminf(mpx->max, mpx->gain));
|
mpx->gain = fmaxf(0.0f, fminf(mpx->max, mpx->gain));
|
||||||
|
|
||||||
float output_sample = sample * mpx->gain;
|
float output_sample = sample * mpx->gain * sqrtf(2);
|
||||||
if(deviation_to_dbr(avg_deviation * mpx->gain) > mpx->target && deviation_to_dbr(avg_deviation) < mpx->target) {
|
if(deviation_to_dbr(avg_deviation * mpx->gain) > mpx->target && deviation_to_dbr(avg_deviation) < mpx->target) {
|
||||||
// Gain is too much, reduce
|
// Gain is too much, reduce
|
||||||
float overshoot_dbr = deviation_to_dbr(avg_deviation * mpx->gain) - mpx->target;
|
float overshoot_dbr = deviation_to_dbr(avg_deviation * mpx->gain) - mpx->target;
|
||||||
|
|||||||
Reference in New Issue
Block a user