Re: Audio Input Queue on iPhone
Re: Audio Input Queue on iPhone
- Subject: Re: Audio Input Queue on iPhone
- From: "Inca R" <email@hidden>
- Date: Sun, 28 Sep 2008 11:59:44 +0300
Hi;
Thanks William.
I'm trying to use Audio Units with remote IO but
is very frustrating. There is no documentation and
no sample code on how to use the Remote IO AudioUnit
I had write some code but after I call AudioOutputUnitStart( AudioUnit )
I get a bad access expection and I have no idea from where it comes.
If you have some sample code
or any pointer to documentation for iPhone will be grat.
Thanks
Inca
On Wed, Sep 24, 2008 at 11:54 PM, William Stewart
<email@hidden> wrote:
nope
for a VoIP client you should be using the AU Remote IO audio unit - you have one that you use for both input and output and it will give you a much lower latency than you can get from using audio queue for duplex I/O
On Sep 24, 2008, at 1:47 PM, Inca R wrote:
Hi;
Is Audio Queues for iPhone the best interface API to get
Audio Input ( mic ) samples for a real time App ? ( VoIP client )
Thanks
Inca
On Wed, Sep 24, 2008 at 5:00 AM, William Stewart
<email@hidden> wrote:
Check the result code returned by AudioQueueNewInput - the ASBD you have for this is not correct - you could specify the ASBD with everything set to zero except for formatID, num channels and sample rate, and the AQ will fill this out for you
Bill
On Sep 23, 2008, at 6:24 AM, Inca R wrote:
Hi;
I'm trying to get ulaw samples at 20 millis from the iPhone mic, but this seems impossible.
The audioFormat definition is:
audioFormat.mSampleRate = 8000.0;
audioFormat.mFormatID = kAudioFormatUlaw;
audioFormat.mFormatFlags = 0;
audioFormat.mFramesPerPacket = 1;
audioFormat.mChannelsPerFrame = 1;
audioFormat.mBitsPerChannel = 8;
audioFormat.mBytesPerPacket = 1;
audioFormat.mBytesPerFrame = 1;
The audio input queue creation:
AudioQueueNewInput (
&audioFormat,
recordingCallback,
mydata, // userData
NULL, // run loop
kCFRunLoopCommonModes,// run loop mode
0, // flags
&queueObject
);
I also create 3 buffers of 160 bytes ( 20 millis ) each and enqueue them into the previously created Audio Input Queue.
Everything works ok, BUT, there is a problem on the frequency I get called to my AudioQueueInputCallback function ( recordingCallback).
It was expected to be every 20 millis. But not. The Callback get called
every 30 to 70 nanoseconds but every 1/2 second the callback is called with a 1/2~1 second delay.
Anybody knows the logic behind this behavior ?
I'm missing any configuration or parameter ????
another issue is that the documentation says that for CBR codecs the last two parameters
of the callback function are set to NULL. But in my example I get called with the last one set to NULL
but the other one with the number of samples returned on the buffer.
This is correct ???
Thanks
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Coreaudio-api mailing list (email@hidden)
This email sent to email@hidden
_______________________________________________
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