Removed debugging messages.
parent
a18ab13d58
commit
1eda6c0e7d
|
@ -37,7 +37,6 @@ static OSStatus ACInputProc(AudioConverterRef inAudioConverter, UInt32* ioNumber
|
||||||
|
|
||||||
if (converter->inputBufferSize > 0) {
|
if (converter->inputBufferSize > 0) {
|
||||||
int amountConverted = *ioNumberDataPackets * converter->inputFormat.mBytesPerPacket;
|
int amountConverted = *ioNumberDataPackets * converter->inputFormat.mBytesPerPacket;
|
||||||
NSLog(@"Asking: %i", amountConverted);
|
|
||||||
if (amountConverted > converter->inputBufferSize) {
|
if (amountConverted > converter->inputBufferSize) {
|
||||||
amountConverted = converter->inputBufferSize;
|
amountConverted = converter->inputBufferSize;
|
||||||
}
|
}
|
||||||
|
@ -51,7 +50,6 @@ static OSStatus ACInputProc(AudioConverterRef inAudioConverter, UInt32* ioNumber
|
||||||
|
|
||||||
converter->inputBufferSize -= amountConverted;
|
converter->inputBufferSize -= amountConverted;
|
||||||
converter->inputBuffer = ((char *)converter->inputBuffer) + amountConverted;
|
converter->inputBuffer = ((char *)converter->inputBuffer) + amountConverted;
|
||||||
NSLog(@"Converted: %i", amountConverted);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ioData->mBuffers[0].mData = NULL;
|
ioData->mBuffers[0].mData = NULL;
|
||||||
|
@ -87,17 +85,13 @@ static OSStatus ACInputProc(AudioConverterRef inAudioConverter, UInt32* ioNumber
|
||||||
ioData.mNumberBuffers = 1;
|
ioData.mNumberBuffers = 1;
|
||||||
inputBuffer = input;
|
inputBuffer = input;
|
||||||
inputBufferSize = inputSize;
|
inputBufferSize = inputSize;
|
||||||
NSLog(@"Converting: %i", inputSize);
|
|
||||||
|
|
||||||
err = AudioConverterFillComplexBuffer(converter, ACInputProc, self, &ioNumberFrames, &ioData, NULL);
|
err = AudioConverterFillComplexBuffer(converter, ACInputProc, self, &ioNumberFrames, &ioData, NULL);
|
||||||
if (err != noErr || needsReset) //It returns insz at EOS at times...so run it again to make sure all data is converted
|
if (err != noErr || needsReset) //It returns insz at EOS at times...so run it again to make sure all data is converted
|
||||||
{
|
{
|
||||||
NSLog(@"Error:%i %i", err, noErr);
|
|
||||||
AudioConverterReset(converter);
|
AudioConverterReset(converter);
|
||||||
}
|
}
|
||||||
|
|
||||||
NSLog(@"Pass: %i", inputSize - inputBufferSize);
|
|
||||||
|
|
||||||
outputBufferSize = ioData.mBuffers[0].mDataByteSize;
|
outputBufferSize = ioData.mBuffers[0].mDataByteSize;
|
||||||
|
|
||||||
return inputSize - inputBufferSize;
|
return inputSize - inputBufferSize;
|
||||||
|
|
Loading…
Reference in New Issue