Re: Is there limit of the parameter of setNumSampleFramesPerBuffer?
Re: Is there limit of the parameter of setNumSampleFramesPerBuffer?
- Subject: Re: Is there limit of the parameter of setNumSampleFramesPerBuffer?
- From: Jeff Moore <email@hidden>
- Date: Fri, 05 Dec 2008 00:28:33 -0800
Basically, the upper bound on the size of your driver's ring buffers
is going to be governed by the amount of available wired memory. I
believe the IOAudio family does some range checking on that value to
keep it from getting out of hand, but I'd have to look at the sources
to be certain.
At any rate, you want to be careful about making your ring buffers too
large. First and foremost, you're chewing up wired memory, which is a
precious resources. But secondly, the frequency at which the driver
will drop time stamps for the HAL is gets lower as the driver's ring
buffer gets larger. This reduces the HAL's ability to keep up with
changes in the device's rate scalar.
You also don't want to make your ring buffers too small either. For
many bits of hardware, the number of interrupts needed varies
inversely with the ring buffer size. In other words, the smaller the
ring buffer, the more interrupts.
Generally, you want to pick a buffer size that's big enough so as to
keep the number of interrupts at a reasonable level, but not so big as
to use too much memory.
Oh. And it was good to hear that you were able to figure out why IO
wasn't working for your device.
On Dec 4, 2008, at 10:39 PM, David Tan wrote:
Hi All,
I just tried to input a very big value to
SetNumSampleFramesPerBuffer(), but it seems that this method will do
range check itself.
While debugging the clipOutputSamples() and checking the parameter
firstSampleFrame of it, I think the maximum of sample frames per
buffer is 16384 (0x4000).
Is that expected behavior? Thanks!
Best Regards,
David Tan,
Software Engineer,
Dextrys Co., Ltd.
From: coreaudio-api-bounces+david.tan=email@hidden [mailto:coreaudio-api-bounces+david.tan=email@hidden
] On Behalf Of David Tan
Sent: Friday, December 05, 2008 12:54 PM
To: CoreAudio-API Mailing List
Subject: Is there limit of the parameter of
setNumSampleFramesPerBuffer?
Hi Apple,
I know we can call setNumSampleFramesPerBuffer() anytime we want,
except for wrapping it in a pair of beginConfigurationChange() and
completeConfigurationChange().
But I want to know the maximum and potential minimum value of its
parameter. For example, could I input such a big value as 5M to it?
Thanks a lot!
--
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