Re: Different input buffer and output buffer sizes in IOProc?
Re: Different input buffer and output buffer sizes in IOProc?
- Subject: Re: Different input buffer and output buffer sizes in IOProc?
- From: Jeff Moore <email@hidden>
- Date: Tue, 12 May 2009 11:11:50 -0700
The IOProc should always be seeing the same number of sample frames in
all the buffers in each AudioBufferList it is passed.
This is a function of the HAL and not the audio driver. There really
isn't any provision in the code for something like this to happen, and
I've never seen a report of it happening before now.
So I suspect there is a bug involved somewhere. It could be in your
instrumentation or it could be in the HAL. Your best bet would be to
boil this down to a simpler test case (say using HALLab for example),
and put it in a bug so we can take a look at it.
On May 12, 2009, at 4:51 AM, Jesper Papmehl-Dufay wrote:
One of our testers have reported a problem in our app where it
asserts in our IOProc due to the input buffer size being different
from the output buffer size.
(We calculate the buffer sizes by dividing inInputData->mBuffers
[0].mDataByteSize by (sizeof(float) * inInputData->mBuffers
[0].mNumberChannels) for the input side, and in the same way for the
output size using the outOutputData AudioBufferList parameter to the
IOProc.)
Is it really normal for a device to have different sizes for the
input and output buffers in a single IOProc call? Or should we
consider this a driver bug and handle it accordingly?
The user reports getting our assert when changing the sample rate,
so it's possible the driver is in some kind of transitional state
when this happens. The audio device used is a M-Audio FW410.
We use the HAL directly and install the IOProc using
AudioDeviceAddIOProc, if that makes any difference.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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