AudioConverterFillComplexBuffer failure
AudioConverterFillComplexBuffer failure
- Subject: AudioConverterFillComplexBuffer failure
- From: dct <email@hidden>
- Date: Mon, 20 Jul 2009 12:09:30 -0700
As reported earlier in the thread "Endless loop running
AudioConverterFillComplexBuffer", I have a situation where, once
called, AudioConverterFillComplexBuffer calls the inputProc once and
then fails--neither calling inputProc again nor returning.
Within the inputProc there are the following four lines:
ioData->mNumberBuffers = 1;
ioData->mBuffers[0].mNumberChannels = 1;
ioData->mBuffers[0].mDataByteSize = inBytes; // =627, the sz of
one pckt in an mp3 test
ioData->mBuffers[0].mData = callBack->ioBuffer; // an allocated
buffer
In the first (&only) inputProc call, and prior to these lines, ioData
exists at a valid location (ex. 0x8ac400) with member values:
ioData->mNumberBuffers = 1;
ioData->mBuffers[0].mNumberChannels = 2;
ioData->mBuffers[0].mDataByteSize = 0;
ioData->mBuffers[0].mData = 0x0;
Following execution of the four lines of code, none of ioData member
values have changed -- obviousy a problem and one that I don't
understand.
I infer that there must be a problem with the
AudioConverterFillComplexBuffer call itself but I sure can't find it.
The call is:
err = AudioConverterFillComplexBuffer(
aCnvrtr, inputCallback, &inProcData, &nFrms, &aBufList,
NULL );
where:
- aCnvrtr was created by:
err = AudioConverterNew(&inASBD, &outASBD, &aCnvrtr);
( inASBD and outASBD being AudioStreamBasicDescription
instances ),
- inputCallback is the inputProc function,
- inProcData is an existing structure,
- nFrms = output frms ( =1152 -- frms from one input pckt in the
case at hand ),
- aBufList has member values as follows:
aBufList.mNumberBuffers = 1;
aBufList.mBuffers[0].mNumberChannels = 1;
aBufList.mBuffers[0].mDataByteSize = bufferSz; ( 9216 = 1152
frms x 8 bytes/frm )
aBufList.mBuffers[0].mData = outBuffer; ( an allocated,
external buffer ).
For the case at hand, the ASBD member values were:
inABSD outASBD
mSampleRate 44100 44100
mFormatID '.mp3' 'lpcm'
mFormatFlags 0 9
( kAudioFormatFlagIsFloat |
kAudioFormatFlagIsPacked
)
mBytesPerPacket 0 8
mFramesPerPacket 1152 1
mBytesPerFrame 0 8
mChannelsPerFrame 2 2
mBitsPerChannel 0 32
mReserved 0 0
I'm stumped and need help. Thanks, Don Thompson
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden