This commit is contained in:
2026-04-28 16:59:45 +02:00
parent d79f2aa97d
commit d54430c6ac
+2 -2
View File
@@ -24,7 +24,7 @@ void init_bs412(BS412Compressor* comp, uint32_t mpx_deviation, float target_powe
comp->target = target_power; // target is expected to not be our rms format
comp->gain = 1.0f;
comp->can_compress = 1;
comp->second_counter = 0;
comp->second_counter = BS412_TIME+1;
comp->max_gain = max_gain;
#ifdef BS412_DEBUG
debug_printf("Initialized MPX power measurement with sample rate: %d\n", sample_rate);
@@ -47,7 +47,7 @@ float bs412_compress(BS412Compressor* comp, float audio, float sample_mpx) {
if(comp->can_compress == 0) comp->second_counter++;
}
if(comp->can_compress == 0 || comp->second_counter > BS412_TIME) {
if(comp->can_compress == 0 && comp->second_counter > BS412_TIME) {
#ifdef BS412_DEBUG
debug_printf("Can compress.\n");
#endif