0
1
mirror of https://github.com/radio95-rnt/fm95.git synced 2026-02-27 11:33:54 +01:00

get rid of compressor

This commit is contained in:
2025-03-02 10:30:07 +01:00
parent 30ddac535d
commit bae5ae5c1b
3 changed files with 5 additions and 48 deletions

View File

@@ -34,7 +34,7 @@
#include <pulse/error.h>
#define MASTER_VOLUME 1.0f // Volume of everything combined, for calibration
#define AUDIO_VOLUME 1.0f // Audio volume, before clipper
#define AUDIO_VOLUME 1.5f // Audio volume, before clipper
#define MONO_VOLUME 0.45f // L+R Signal
#define PILOT_VOLUME 0.09f // 19 KHz Pilot
#define STEREO_VOLUME 0.45f // L-R signal, should be same as MONO
@@ -374,9 +374,6 @@ int main(int argc, char **argv) {
BiquadFilter lpf_l, lpf_r;
init_lpf(&lpf_l, LPF_CUTOFF, 1.25f, SAMPLE_RATE);
init_lpf(&lpf_r, LPF_CUTOFF, 1.25f, SAMPLE_RATE);
Compressor comp;
init_compressor(&comp, 0.9995f, 0.8f);
// #endregion
signal(SIGINT, stop);
@@ -417,10 +414,8 @@ int main(int argc, char **argv) {
float current_mpx_in = mpx_in[i];
float current_sca_in = sca_in[i];
float ready_r;
float ready_l = peak_compress_stereo(&comp, l_in, r_in, &ready_r);
ready_l = apply_frequency_filter(&lpf_l, l_in);
ready_r = apply_frequency_filter(&lpf_r, r_in);
float ready_l = apply_frequency_filter(&lpf_l, l_in);
float ready_r = apply_frequency_filter(&lpf_r, r_in);
ready_l = apply_preemphasis(&preemp_l, ready_l)*4;
ready_r = apply_preemphasis(&preemp_r, ready_r)*4;
ready_l = hard_clip(ready_l*audio_volume, clipper_threshold);