aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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;