From b7975763cfb15ee4186d787e7966bc17b46bbc9e Mon Sep 17 00:00:00 2001 From: Chrystian Huot Date: Sun, 17 May 2026 08:57:02 -0400 Subject: [PATCH] fix: refactor audio conversion mode handling in FFMpeg --- server/ffmpeg.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/ffmpeg.go b/server/ffmpeg.go index 6cf44ce..f908a1a 100644 --- a/server/ffmpeg.go +++ b/server/ffmpeg.go @@ -96,9 +96,10 @@ func (ffmpeg *FFMpeg) Convert(call *Call, systems *Systems, tags *Tags, mode uin } if ffmpeg.version43 { - if mode == AUDIO_CONVERSION_ENABLED_NORM { + switch mode { + case AUDIO_CONVERSION_ENABLED_NORM: args = append(args, "-af", "apad=whole_dur=3s,loudnorm") - } else if mode == AUDIO_CONVERSION_ENABLED_LOUD_NORM { + case AUDIO_CONVERSION_ENABLED_LOUD_NORM: args = append(args, "-af", "apad=whole_dur=3s,loudnorm=I=-16:TP=-1.5:LRA=11") } }