[vlc-commits] audio output core: normalize tracks without replaygain peak data (fix #8165 )

Anatoliy Anischovich git at videolan.org
Fri Mar 8 16:30:12 CET 2013


vlc | branch: master | Anatoliy Anischovich <lin.aaa.lin at gmail.com> | Fri Mar  8 15:17:23 2013 +0200| [f8ebe37339473e0ff6d7223f8c556cadc3e9654e] | committer: Rémi Denis-Courmont

audio output core: normalize tracks without replaygain peak data (fix #8165)

Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f8ebe37339473e0ff6d7223f8c556cadc3e9654e
---

 src/audio_output/volume.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/audio_output/volume.c b/src/audio_output/volume.c
index 7eb977d..b16cc83 100644
--- a/src/audio_output/volume.c
+++ b/src/audio_output/volume.c
@@ -179,10 +179,10 @@ static float aout_ReplayGainSelect(vlc_object_t *obj, const char *str,
 
         multiplier = pow (10., gain / 20.);
 
-        if (replay_gain->pb_peak[mode]
-         && var_InheritBool (obj, "audio-replay-gain-peak-protection")
-         && replay_gain->pf_peak[mode] * multiplier > 1.f)
-            multiplier = 1.f / replay_gain->pf_peak[mode];
+        if (var_InheritBool (obj, "audio-replay-gain-peak-protection"))
+            multiplier = fminf (multiplier, replay_gain->pb_peak[mode]
+                                            ? 1.f / replay_gain->pf_peak[mode]
+                                            : 1.f);
     }
 
     /* Command line / configuration gain */



More information about the vlc-commits mailing list