From b09834b8010a358f1a0d8eea7c32489ad05c9e38 Mon Sep 17 00:00:00 2001 From: KubaPro010 Date: Fri, 3 Jul 2026 09:58:53 +0200 Subject: [PATCH] correct the audio volume calculation (audio should now be a little quieter) --- src/fm95.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fm95.c b/src/fm95.c index ebff448..eec4253 100644 --- a/src/fm95.c +++ b/src/fm95.c @@ -109,7 +109,8 @@ static inline bool compare_dvs(const FM95_DeviceNames *a, const FM95_DeviceNames } static float calculate_sharedaudio_volume(const FM95_Volumes volumes, const int rds_streams) { - float rds_volume = volumes.rds * powf(volumes.rds_step, rds_streams); + float rds_volume = 0.0f; + for (int i = 0; i < rds_streams; i++) rds_volume += volumes.rds * powf(volumes.rds_step, i); return 1.0f - rds_volume - volumes.pilot - volumes.headroom; }