From 8932a9a24dde1c136eeb5e3931bf99ae93418695 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Tue, 8 Jul 2025 19:39:25 +0200 Subject: [PATCH] change logic of the master volume --- .vscode/.server-controller-port.log | 2 +- src/fm95.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/.server-controller-port.log b/.vscode/.server-controller-port.log index 6f6b908..ff10b4b 100644 --- a/.vscode/.server-controller-port.log +++ b/.vscode/.server-controller-port.log @@ -1,5 +1,5 @@ { "port": 13452, - "time": 1751831842961, + "time": 1751996081486, "version": "0.0.3" } \ No newline at end of file diff --git a/src/fm95.c b/src/fm95.c index fc4dac6..ab77c67 100644 --- a/src/fm95.c +++ b/src/fm95.c @@ -248,7 +248,7 @@ int run_fm95(const FM95_Config config, FM95_Runtime* runtime) { mpx *= bs412_audio_gain; - output[i] = hard_clip(mpx, 1.0f)*config.master_volume+mpx_in[i]; // Ensure peak deviation of 75 khz, assuming we're calibrated correctly + output[i] = hard_clip((mpx_in[i]+mpx)*config.master_volume, 1.0); // Ensure peak deviation of 75 khz, assuming we're calibrated correctly (lower) advance_oscillator(&osc); }