diff options
author | J. Alexander Treuman <jat@spatialrift.net> | 2006-07-27 00:50:59 +0000 |
---|---|---|
committer | J. Alexander Treuman <jat@spatialrift.net> | 2006-07-27 00:50:59 +0000 |
commit | 22b16884a2fb054ed219f07774cc16ec3af34c26 (patch) | |
tree | 605a3313d64b7a048c9cab56b2db210eaf7d40a5 /src/outputBuffer.c | |
parent | bf5336cebd9e31e0eb0664ef62ce5c6751aa31a3 (diff) | |
download | mpd-22b16884a2fb054ed219f07774cc16ec3af34c26.tar.gz mpd-22b16884a2fb054ed219f07774cc16ec3af34c26.tar.xz mpd-22b16884a2fb054ed219f07774cc16ec3af34c26.zip |
Use AudioCompress for volume normalization
git-svn-id: https://svn.musicpd.org/mpd/trunk@4474 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/outputBuffer.c | 21 |
1 files changed, 2 insertions, 19 deletions
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) { |