rewrite replaygain code, needs testing

git-svn-id: https://svn.musicpd.org/mpd/trunk@2482 09075e82-0dd4-0310-85a5-a0d7c8717e4f
This commit is contained in:
Warren Dukes
2004-11-02 19:56:59 +00:00
parent 1d105d126e
commit 54679d9028
12 changed files with 136 additions and 98 deletions
+4 -1
View File
@@ -64,7 +64,8 @@ void flushOutputBuffer(OutputBuffer * cb) {
int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream,
DecoderControl * dc, int seekable, char * dataIn,
long dataInLen, float time, mpd_uint16 bitRate)
long dataInLen, float time, mpd_uint16 bitRate,
ReplayGainInfo * replayGainInfo)
{
mpd_uint16 dataToSend;
mpd_uint16 chunkLeft;
@@ -91,6 +92,8 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream,
&(cb->audioFormat),data);
}
doReplayGain(replayGainInfo, data, datalen, &cb->audioFormat);
while(datalen) {
if(currentChunk != cb->end) {
int next = cb->end+1;