aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2006-07-24 16:32:50 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2006-07-24 16:32:50 +0000
commit48240740e7aaaa58df65d570afa6ccbac8d590b2 (patch)
tree9079a4ca6dbc9d90267edf1de041bf6490f1e926
parent24c1f46353213e3392b542a6c3655bcd215e7c63 (diff)
downloadmpd-48240740e7aaaa58df65d570afa6ccbac8d590b2.tar.gz
mpd-48240740e7aaaa58df65d570afa6ccbac8d590b2.tar.xz
mpd-48240740e7aaaa58df65d570afa6ccbac8d590b2.zip
Do normalization if there's replaygain data but replaygain is off
git-svn-id: https://svn.musicpd.org/mpd/trunk@4445 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/outputBuffer.c2
-rw-r--r--src/replayGain.c2
-rw-r--r--src/replayGain.h2
3 files changed, 4 insertions, 2 deletions
diff --git a/src/outputBuffer.c b/src/outputBuffer.c
index 02d9234fd..90f2ef2db 100644
--- a/src/outputBuffer.c
+++ b/src/outputBuffer.c
@@ -115,7 +115,7 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream,
&(cb->audioFormat), data);
}
- if (replayGainInfo) {
+ if (replayGainInfo && (replayGainState != REPLAYGAIN_OFF)) {
doReplayGain(replayGainInfo, data, datalen, &cb->audioFormat);
} else if (normalEnable) {
normalizeData(data, datalen, &cb->audioFormat);
diff --git a/src/replayGain.c b/src/replayGain.c
index 5c0664563..52362946e 100644
--- a/src/replayGain.c
+++ b/src/replayGain.c
@@ -27,7 +27,7 @@
#include <stdlib.h>
/* Added 4/14/2004 by AliasMrJones */
-static int replayGainState = REPLAYGAIN_OFF;
+int replayGainState = REPLAYGAIN_OFF;
static float replayGainPreamp = 1.0;
diff --git a/src/replayGain.h b/src/replayGain.h
index c8a6965e0..74c28c33f 100644
--- a/src/replayGain.h
+++ b/src/replayGain.h
@@ -26,6 +26,8 @@
#define REPLAYGAIN_TRACK 1
#define REPLAYGAIN_ALBUM 2
+extern int replayGainState;
+
typedef struct _ReplayGainInfo {
float albumGain;
float albumPeak;