Re: Endless loop running AudioConverterFillComplexBuffer
Re: Endless loop running AudioConverterFillComplexBuffer
- Subject: Re: Endless loop running AudioConverterFillComplexBuffer
- From: dct <email@hidden>
- Date: Mon, 13 Jul 2009 12:29:40 -0700
Thanks for your reply.
On Jul 13, 2009, at 10:11 AM, james mccartney wrote:
I can't really tell from this. You're sure you aren't returning a
packet description of zero bytes? That is my only guess at this point.
As best I can tell, the returned packet description is ok.
I get to it like so:
a. In the function titled "convertInputToPCM(...)" -- the function
that calls "AudioConverterFillComplexBuffer" -- I declare a packet
description instance:
static AudioStreamPacketDescription aspdOut;
and then define a member of the structure, inProcData (aka, userData),
as:
inProcData.outPcktDescPtr = &aspdOut; .
b. In the inputProc function titled "inputCallback(...)" I declare:
InputProcessData *callBack=(InputProcessData *)inUserData;
set the pointer of the return outDataPacketDescription to that of the
aspdOut instance:
*outDataPacketDescription = callBack->outPcktDescPtr;
and set the packet description values as:
callData->outPcktDescPtr->mStartOffset = 0;
callBack->outPcktDescPtr->mVariableFramesInPacket = 1;
callBack->outPcktDescPtr->mDataByteSize =
nn * callBack-
>outBytsPerInPckt;
(which in test case = 9216 = # out bytes from 1 input
packet).
In debug, in the converter's first call to the inputProc function and
just before return to the converter, I see the return
outDataPacketDescription described as follows:
outDataPacketDescription 0xbfffe930
*outDataPacketDescription 0x170a7c
mStartOffset 0
mVariableFramesInPacket 1
mDataByteSize 9216
all of which seems ok.
After that breakpoint, AudioConverterFillComplexBuffer ceases to
operate -- it neither returns to the calling function nor does it call
the inputProc again.
If I set mVariableFramesInPacket value to 0, I get the same behavior
(for whatever that's worth).
_______________________________________________
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