Re: hardcoded microphone buffering in iPhone?
Re: hardcoded microphone buffering in iPhone?
- Subject: Re: hardcoded microphone buffering in iPhone?
- From: Inca Rose <email@hidden>
- Date: Mon, 24 Nov 2008 12:13:06 +0200
Hi;
I know, I got really crazy trying to figure out how things work.
There is now a sample code from WWDC08 in the net that you can check.
Its name is aurio and
provides a good example ( not complete and not documented ) on how to
use AU remoteIO.
REgarding the buffer size, you can set a parameter to your Audio Session
The parameter is in seconds, and the buffer size will depend on the
audio format you are using, so
you have to do your maths :)
Float32 preferredBufferSize = 0.005; // 5 millis buffer
UInt32 size = sizeof(preferredBufferSize);
AudioSessionSetProperty
(kAudioSessionProperty_PreferredHardwareIOBufferDuration, size,
&preferredBufferSize);
AudioSessionGetProperty
(kAudioSessionProperty_CurrentHardwareIOBufferDuration, &size,
&preferredBufferSize);
Regards
Inca R
On Nov 24, 2008, at 11:36 AM, Nate wrote:
Hi Inca,
Thanks for the AU RemoteIO tip! It seems to be notifying properly
and not buffering internally, however there doesn't appear to be a
mechanism for setting the buffer size. Is this right? The default
buffer size is small enough for my needs so this is ok, but I would
like to set it explicitly. If it is ever larger than the size I need
then my app will not work properly.
Am I missing something or is AU RemoteIO completely undocumented? I
had to cobble it together from the one or two code snippets
scattered across the internet. That this isn't documented and that
the 8kb hardcoded buffering of AQS isn't documented wasted a
significant amount of my time, as the chew marks on my monitor can
attest. I certainly hope that not all iPhone programming is this fun.
-Nate
_______________________________________________
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