From aaf5eae5e2a66c4f1b0e18e266377182525448d3 Mon Sep 17 00:00:00 2001 From: Sean Greenslade Date: Tue, 14 Mar 2017 19:36:24 -0700 Subject: Added gain_mul setting to soften effect of replaygain. --- src/player.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/player.c') diff --git a/src/player.c b/src/player.c index 784616c..f3c57f8 100644 --- a/src/player.c +++ b/src/player.c @@ -94,13 +94,13 @@ void BarPlayerSetVolume (player_t * const player) { * -> print to string and let them parse it again */ char strbuf[16]; snprintf (strbuf, sizeof (strbuf), "%fdB", - player->settings->volume + player->gain); + player->settings->volume + (player->gain * player->settings->gainMul)); assert (player->fgraph != NULL); if ((ret = avfilter_graph_send_command (player->fgraph, "volume", "volume", strbuf, NULL, 0, 0)) < 0) { #else /* convert from decibel */ - const double volume = pow (10, (player->settings->volume + player->gain) / 20); + const double volume = pow (10, (player->settings->volume + (player->gain * player->settings->gainMul)) / 20); /* libav does not provide other means to set this right now. it might not * even work everywhere. */ assert (player->fvolume != NULL); -- cgit v1.2.3