Re: [coreaudio] Re: Setting buffer size?
Re: [coreaudio] Re: Setting buffer size?
- Subject: Re: [coreaudio] Re: Setting buffer size?
- From: Michael Bonnice <email@hidden>
- Date: Wed, 5 Nov 2003 14:00:30 -0700
Of course, you want to make sure that this number numFrames is in terms
of frames and not bytes. A 4k buffer probably means 4096 bytes, which
is 512 samples of four bytes each for each of two channels.
For the default output device, a frame is one sample for two channels,
or 8 bytes.
Mike
On Nov 4, 2003, at 11:33 PM, Michael Thornburgh wrote:
you want to set the "kAudioDevicePropertyBufferFrameSize" property on
the audio device:
- (void) setDeviceBufferSizeInFrames:(UInt32)numFrames
{
OSStatus theStatus;
UInt32 theSize;
theSize = sizeof(UInt32);
theStatus = AudioDeviceSetProperty ( myDevice, NULL, 0, false,
kAudioDevicePropertyBufferFrameSize, theSize, &numFrames );
}
-mike
On Nov 4, 2003, at 7:40 PM, Christy Warren wrote:
This is probably an FAQ but google search didn't reveal anything.
I have an audioProc for writing my sound buffers out to the audio
hardware. One of the parameters is an in/out parameter that contains
a list of the buffers that you need to write to.
I can write my audio by filling the whole 4k buffer. However i would
rather write smaller chunks. Is there any way to change the buffer
size that is expected? I tried setting the size field in the
AudioBuffer but that seems to have no effect.
What is the right way to do this?
Christy
_______________________________________________
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.