Re: How to set buffer size for Audio Output Unit?
Re: How to set buffer size for Audio Output Unit?
- Subject: Re: How to set buffer size for Audio Output Unit?
- From: Doug Wyatt <email@hidden>
- Date: Fri, 31 Aug 2001 14:19:27 -0700
Yes, the sample rate converter will pull for however many samples it
needs in order to fill the hardware buffer, and if the sample rate ratio
is non-integral, then that number of samples will vary slightly. We're
trying to minimize copying / re-buffering.
Doug
On Friday, August 31, 2001, at 12:44 , Christof Faller wrote:
Doug,
One thing you can do now is ask the output unit for the underlying
AudioDevice it is talking to, and change its buffer size via the
lower-level API:
Thanks, it works! I increased the AudioOutputUnit buffer size by
increasing the
device buffer size. Now I have enough time within AudioUnitCallback to
do
my processing.
An interesting (however obvious) observation which I made:
For a given output device I can set the buffer size. If SRA/SRD*BS is
not
an integer, then the AudioOutputUnit will be called with buffer sizes
varying +-1 (SRA = sample rate audio unit, SRD sample rate device,
BS = device buffer size).
Thanks!
Chris
--
Doug Wyatt
work: email@hidden (CoreAudio)
personal: email@hidden
http://www.sonosphere.com
"It's kind of fun to do the impossible."
-- Walt Disney