mirror of
https://github.com/radio95-rnt/fm95.git
synced 2026-07-30 16:29:15 +02:00
real fix
This commit is contained in:
+2
-2
@@ -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->target = target_power; // target is expected to not be our rms format
|
||||||
comp->gain = 1.0f;
|
comp->gain = 1.0f;
|
||||||
comp->can_compress = 1;
|
comp->can_compress = 1;
|
||||||
comp->second_counter = 0;
|
comp->second_counter = BS412_TIME+1;
|
||||||
comp->max_gain = max_gain;
|
comp->max_gain = max_gain;
|
||||||
#ifdef BS412_DEBUG
|
#ifdef BS412_DEBUG
|
||||||
debug_printf("Initialized MPX power measurement with sample rate: %d\n", sample_rate);
|
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++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(comp->can_compress == 0 || comp->second_counter > BS412_TIME) {
|
if(comp->can_compress == 0 && comp->second_counter > BS412_TIME) {
|
||||||
#ifdef BS412_DEBUG
|
#ifdef BS412_DEBUG
|
||||||
debug_printf("Can compress.\n");
|
debug_printf("Can compress.\n");
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user