Commit 48240740 authored by J. Alexander Treuman's avatar J. Alexander Treuman

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
parent 24c1f463
...@@ -115,7 +115,7 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream, ...@@ -115,7 +115,7 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream,
&(cb->audioFormat), data); &(cb->audioFormat), data);
} }
if (replayGainInfo) { if (replayGainInfo && (replayGainState != REPLAYGAIN_OFF)) {
doReplayGain(replayGainInfo, data, datalen, &cb->audioFormat); doReplayGain(replayGainInfo, data, datalen, &cb->audioFormat);
} else if (normalEnable) { } else if (normalEnable) {
normalizeData(data, datalen, &cb->audioFormat); normalizeData(data, datalen, &cb->audioFormat);
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include <stdlib.h> #include <stdlib.h>
/* Added 4/14/2004 by AliasMrJones */ /* Added 4/14/2004 by AliasMrJones */
static int replayGainState = REPLAYGAIN_OFF; int replayGainState = REPLAYGAIN_OFF;
static float replayGainPreamp = 1.0; static float replayGainPreamp = 1.0;
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#define REPLAYGAIN_TRACK 1 #define REPLAYGAIN_TRACK 1
#define REPLAYGAIN_ALBUM 2 #define REPLAYGAIN_ALBUM 2
extern int replayGainState;
typedef struct _ReplayGainInfo { typedef struct _ReplayGainInfo {
float albumGain; float albumGain;
float albumPeak; float albumPeak;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment