Re: Audio Device minimum buffer size
Re: Audio Device minimum buffer size
- Subject: Re: Audio Device minimum buffer size
- From: Jeff Moore <email@hidden>
- Date: Thu, 24 Jul 2003 12:14:47 -0700
From what I recall of CarbonSndPlayDoubleBuffer, I'm pretty sure it was
still based on the Sound Manager. The Sound Manager doesn't change the
buffer size in the HAL. No matter what buffer size you were running at
then, the IO cycle in the HAL was still 512 frames.
A 32 frame IO cycle at a 44100 sampling rate is roughly 725
microseconds in duration. Single processor scheduling latencies for
real time threads average around 110 microseconds (dual processor
latencies are in the 20-50 microsecond range) and can range much higher
than that depending on the load of the system. There is also some
overhead in the HAL and the driver to set up the call to the IOProc and
to do the reading and writing of the data. So, what you are left with
is a pretty small amount of time. How much directly varies with the
speed of the CPU.
It has been my experience that it takes multiple G4s or one pretty darn
fast G4 to be able to do significant work in the IOProc at such small
cycle times. The systems I have seen be successful at small cycle sizes
are the ones that are able to offload the DSP to other threads and just
memcpy the results in the IOProc.
On Thursday, July 24, 2003, at 1:58 AM, Malcolm Haylock wrote:
Hi everyone,
I thought it was about time I changed from using
CarbonSndPlayDoubleBuffer to using Core Audio. Things work fine when I
use an Audio Device output buffer size of at least 128 (for 44.1kHz)
but when I go lower the sound starts breaking up. With
CarbonSndPlayDoubleBuffer I use a buffer size of 32 without problem.
i want a buffer size as low as possible as this affects the latency of
my software from when a player hits a MIDI key to when they hear a
sound played.
Any solutions?
Thanks,
Malcolm Haylock
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.
--
Jeff Moore
Core Audio
Apple
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.