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:
parent
24c1f46353
commit
48240740e7
@ -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);
|
||||
|
@ -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;
|
||||
|
||||
|
@ -26,6 +26,8 @@
|
||||
#define REPLAYGAIN_TRACK 1
|
||||
#define REPLAYGAIN_ALBUM 2
|
||||
|
||||
extern int replayGainState;
|
||||
|
||||
typedef struct _ReplayGainInfo {
|
||||
float albumGain;
|
||||
float albumPeak;
|
||||
|
Loading…
Reference in New Issue
Block a user