From 90a1ca02a23608d375d319e5c1208db77427818c Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 27 Apr 2017 00:15:22 +0200 Subject: 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.) --- audio/filter/af_volume.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'audio/filter') diff --git a/audio/filter/af_volume.c b/audio/filter/af_volume.c index fb7a87f9d0..cc97ac8b2c 100644 --- a/audio/filter/af_volume.c +++ b/audio/filter/af_volume.c @@ -106,7 +106,7 @@ static int control(struct af_instance *af, int cmd, void *arg) } case AF_CONTROL_SET_VOLUME: s->vol = *(float *)arg; - s->level = pow(s->vol, 3); + s->level = *(float *)arg; MP_VERBOSE(af, "volume gain: %f\n", s->level); return AF_OK; case AF_CONTROL_GET_VOLUME: -- cgit v1.2.3