diff --git a/filter/bs412.c b/filter/bs412.c index cc07f9a..1bd1ecd 100644 --- a/filter/bs412.c +++ b/filter/bs412.c @@ -76,7 +76,7 @@ float bs412_compress(BS412Compressor* comp, float audio, float sample_mpx) { comp->gain = fmaxf(0.0f, fminf(2.0f, comp->gain)); - float output_sample = (audio * comp->gain) + comp; + float output_sample = (audio * comp->gain) + sample_mpx; if(deviation_to_dbr(avg_deviation * comp->gain) > comp->target && deviation_to_dbr(avg_deviation) < comp->target) { // Gain is too much, reduce float overshoot_dbr = deviation_to_dbr(avg_deviation * comp->gain) - comp->target; diff --git a/modulation/stereo_encoder.c b/modulation/stereo_encoder.c index 3525f87..fe2ceb5 100644 --- a/modulation/stereo_encoder.c +++ b/modulation/stereo_encoder.c @@ -38,7 +38,7 @@ float stereo_encode(StereoEncoder* st, uint8_t enabled, float left, float right, *audio = (mid*half_audio); if(st->stereo_hilbert) { float stereo = (crealf(stereo_hilbert) * signalx2cos) + (cimagf(stereo_hilbert) * signalx2); - *audio += (stereo * half_audio) + *audio += (stereo * half_audio); } else *audio += ((side*signalx2) * half_audio); return (signalx1*st->pilot_volume); }