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
This commit is contained in:
J. Alexander Treuman 2006-07-24 16:32:50 +00:00
parent 24c1f46353
commit 48240740e7
3 changed files with 4 additions and 2 deletions

View File

@ -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);

View File

@ -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;

View File

@ -26,6 +26,8 @@
#define REPLAYGAIN_TRACK 1
#define REPLAYGAIN_ALBUM 2
extern int replayGainState;
typedef struct _ReplayGainInfo {
float albumGain;
float albumPeak;