Re: Setting the buffer size when using the Default Output AudioUnit
Re: Setting the buffer size when using the Default Output AudioUnit
- Subject: Re: Setting the buffer size when using the Default Output AudioUnit
- From: Chris Rogers <email@hidden>
- Date: Tue, 18 Feb 2003 11:20:30 -0800
Lionel,
Although you can change the device frame size as Luke indicates below,
to solve your problem I would recommend buffering ahead with the
decompression in a separate thread. I think trying to solve your problem
by increasing the buffer size will just get you into trouble.
Chris Rogers
Core Audio
Apple Computer
In the <AudioUnit/AudioUnit.h> API's, get the AudioDeviceID of your
output unit (kAudioOutputUnitProperty_CurrentDevice.)
Armed with that, use the <CoreAudio/CoreAudio.h> API's set the
kAudioDevicePropertyBufferFrameSize on that AudioDeviceID to 4096,
being sure that 4096 falls in the range returned by
kAudioDevicePropertyBufferFrameSizeRange for that device.
On Tuesday, February 18, 2003, at 08:36 AM, Lionel Woog wrote:
Hi,
What can I do to change the number of frames requested by the rendering
callback of the default output unit to be 4096 instead of 512.
At 512, my audio will not play smoothly, as I decompress data in 8192 frames
increments and this requires more CPU than can be done in 512/44100th of a
second.
I can get smooth playback by directly hooking up a rendered to the hardware
audio device (and setting the buffer size appropriately), but doing so
prevents me from having more than one player going at a time.
Thanks for any help,
Lionel
--
Lionel Woog, Ph.D.
CTO
Adapted Wave Technologies, Inc.
email: email@hidden
phone: 212-645-0670
_______________________________________________
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.
_______________________________________________
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.
_______________________________________________
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.