diff options
| author | Sean Greenslade <sean@seangreenslade.com> | 2017-03-14 19:36:24 -0700 | 
|---|---|---|
| committer | Sean Greenslade <sean@seangreenslade.com> | 2017-03-14 19:36:24 -0700 | 
| commit | aaf5eae5e2a66c4f1b0e18e266377182525448d3 (patch) | |
| tree | 5b691432fc4a961d197bb3a4cb736d7398dd8192 /src/player.c | |
| parent | 9b26abba399a9b6d779713033693b631e5084458 (diff) | |
| download | pianobar-aaf5eae5e2a66c4f1b0e18e266377182525448d3.tar.gz pianobar-aaf5eae5e2a66c4f1b0e18e266377182525448d3.tar.bz2 pianobar-aaf5eae5e2a66c4f1b0e18e266377182525448d3.zip  | |
Added gain_mul setting to soften effect of replaygain.
Diffstat (limited to 'src/player.c')
| -rw-r--r-- | src/player.c | 4 | 
1 files changed, 2 insertions, 2 deletions
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);  | 
