Further tweaks to mp3 gapless logic.

CQTexperiment
vspader 2009-02-26 22:46:05 -08:00
parent 94259fd366
commit 672c05ec14
1 changed files with 12 additions and 1 deletions

View File

@ -239,7 +239,7 @@
_endPadding = mad_bit_read(&stream.anc_ptr, 12); _endPadding = mad_bit_read(&stream.anc_ptr, 12);
_startPadding += 528 + 1; //MDCT/filterbank delay _startPadding += 528 + 1; //MDCT/filterbank delay
totalFrames += 528 + 1; _endPadding -= 528 + 1;
/*uint8_t misc =*/ mad_bit_read(&stream.anc_ptr, 8); /*uint8_t misc =*/ mad_bit_read(&stream.anc_ptr, 8);
@ -391,6 +391,9 @@ audio_linear_round(unsigned int bits,
_framesDecoded += _synth.pcm.length; _framesDecoded += _synth.pcm.length;
if (_outputFrames > 0) {
NSLog(@"LOSING FRAMES!");
}
_outputFrames = (sampleCount - startingSample); _outputFrames = (sampleCount - startingSample);
if (_outputBuffer) if (_outputBuffer)
@ -415,6 +418,14 @@ audio_linear_round(unsigned int bits,
outputPtr += stride; outputPtr += stride;
} }
} }
// Output to a file
// FILE *f = fopen("data.raw", "a");
// fwrite(_outputBuffer, sizeof(char), _outputFrames, f);
// fclose(f);
} }
- (int)decodeMPEGFrame - (int)decodeMPEGFrame