From 22b16884a2fb054ed219f07774cc16ec3af34c26 Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" Date: Thu, 27 Jul 2006 00:50:59 +0000 Subject: Use AudioCompress for volume normalization git-svn-id: https://svn.musicpd.org/mpd/trunk@4474 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/outputBuffer.c | 21 ++------------------- 1 file changed, 2 insertions(+), 19 deletions(-) (limited to 'src/outputBuffer.c') diff --git a/src/outputBuffer.c b/src/outputBuffer.c index 90f2ef2db..fe868d54e 100644 --- a/src/outputBuffer.c +++ b/src/outputBuffer.c @@ -78,22 +78,6 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream, size_t datalen; static char *convBuffer = NULL; static long convBufferLen = 0; - static int normalEnable = -1; - ConfigParam *param; - - if (normalEnable == -1) { - normalEnable = getBoolConfigParam(CONF_VOLUME_NORMALIZATION); - if (normalEnable == -1) { - /* not set */ - normalEnable = 0; - } else if (normalEnable < 0) { - param = getConfigParam(CONF_VOLUME_NORMALIZATION); - WARNING("%s is not \"yes\" or \"no\" on line %i, " - "disabling\n", CONF_VOLUME_NORMALIZATION, - param->line); - normalEnable = 0; - } - } if (cmpAudioFormat(&(cb->audioFormat), &(dc->audioFormat)) == 0) { data = dataIn; @@ -115,11 +99,10 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream, &(cb->audioFormat), data); } - if (replayGainInfo && (replayGainState != REPLAYGAIN_OFF)) { + if (replayGainInfo && (replayGainState != REPLAYGAIN_OFF)) doReplayGain(replayGainInfo, data, datalen, &cb->audioFormat); - } else if (normalEnable) { + else if (normalizationEnabled) normalizeData(data, datalen, &cb->audioFormat); - } while (datalen) { if (currentChunk != cb->end) { -- cgit v1.2.3