summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-04-27 00:15:22 +0200
committerwm4 <wm4@nowhere>2017-04-27 00:15:32 +0200
commit90a1ca02a23608d375d319e5c1208db77427818c (patch)
treea103e4700c3b50ac774e4ff36afba023ea681229 /player
parentf1c4d20e6577f32018e20efc4ab9da7d4e1ab4ac (diff)
downloadmpv-90a1ca02a23608d375d319e5c1208db77427818c.tar.bz2
mpv-90a1ca02a23608d375d319e5c1208db77427818c.tar.xz
audio: fix replaygain volume scale
The new replaygain code accidentally applied the linear gain as cubic volume level. Fix this by moving the computation of the volume scale out of the af_volume filter. (Still haven't verified whether the replaygain code works correctly.)
Diffstat (limited to 'player')
-rw-r--r--player/audio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/player/audio.c b/player/audio.c
index dd464614d9..ea013b02e2 100644
--- a/player/audio.c
+++ b/player/audio.c
@@ -176,6 +176,7 @@ void audio_update_volume(struct MPContext *mpctx)
return;
float gain = MPMAX(opts->softvol_volume / 100.0, 0);
+ gain = pow(gain, 3);
gain *= compute_replaygain(mpctx);
if (opts->softvol_mute == 1)
gain = 0.0;