[vlc-commits] aout: avoid duplicate check in replay gain
Rémi Denis-Courmont
git at videolan.org
Fri Jul 20 16:58:39 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Jul 20 17:21:07 2012 +0300| [b2c2e1c76c9e0c4f5c4aba1778ff4b6bde8214b0] | committer: Rémi Denis-Courmont
aout: avoid duplicate check in replay gain
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b2c2e1c76c9e0c4f5c4aba1778ff4b6bde8214b0
---
src/audio_output/volume.c | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/audio_output/volume.c b/src/audio_output/volume.c
index 20cbd32..0991a8b 100644
--- a/src/audio_output/volume.c
+++ b/src/audio_output/volume.c
@@ -154,13 +154,6 @@ static float aout_ReplayGainSelect(vlc_object_t *obj, const char *str,
else
if (!strcmp (str, "album"))
mode = AUDIO_REPLAY_GAIN_ALBUM;
-
- /* If the selectrf mode is not available, prefer the other one */
- if (mode != AUDIO_REPLAY_GAIN_MAX && !replay_gain->pb_gain[mode])
- {
- if (replay_gain->pb_gain[!mode])
- mode = !mode;
- }
}
/* */
@@ -174,6 +167,10 @@ static float aout_ReplayGainSelect(vlc_object_t *obj, const char *str,
{
float gain;
+ /* If the selectrf mode is not available, prefer the other one */
+ if (!replay_gain->pb_gain[mode] && replay_gain->pb_gain[!mode])
+ mode = !mode;
+
if (replay_gain->pb_gain[mode])
gain = replay_gain->pf_gain[mode]
+ var_InheritFloat (obj, "audio-replay-gain-preamp");
More information about the vlc-commits
mailing list