0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

af_volume: dump applied replaygain in verbose mode

This commit is contained in:
wm4 2015-01-04 01:35:48 +01:00
parent 38b503af7b
commit fda44ecc92

View File

@ -76,8 +76,12 @@ static int control(struct af_instance *af, int cmd, void *arg)
gain += s->rgain_preamp;
af_from_dB(1, &gain, &s->rgain, 20.0, -200.0, 60.0);
if (!s->rgain_clip) // clipping prevention
MP_VERBOSE(af, "Applying replay-gain: %f\n", s->rgain);
if (!s->rgain_clip) { // clipping prevention
s->rgain = MPMIN(s->rgain, 1.0 / peak);
MP_VERBOSE(af, "...with clipping prevention: %f\n", s->rgain);
}
}
if (s->detach && fabs(s->level * s->rgain - 1.0) < 0.00001)
return AF_DETACH;