Re: simultaneous record/play at different sample rates on iPhone
Re: simultaneous record/play at different sample rates on iPhone
- Subject: Re: simultaneous record/play at different sample rates on iPhone
- From: Tim <email@hidden>
- Date: Fri, 07 May 2010 16:02:10 -0700
I was wrong to assume that an iPhone app can open only one RemoteIO
AudioUnit, at least as of 3.1.3. I had no problem simultaneously
running one AU at 8 kHz for simultaneous input/output and a second at
44.1 kHz for output only. Probably, one cannot enable recording on
more than one RemoteIO AU, but multiple output AU's seem to be no
problem. So, this is also a simple way to mix multiple streams, though
I guess to benefit from echo cancellation on VoiceProcessingIO variant
you would need to premix the outputs into a single output.
Tim
On May 6, 2010, at 8:53 PM, Tim wrote:
As I understand it, the RemoteIO AudioUnit input and output must run
at same sample rate, and an iPhone app can open only a single instance
of a RemoteIO AudioUnit. Suppose I want to record at 8 kHz while
playing 44.1 kHz. I guess my options are:
1. Run the AU at 8 kHz and downsample the 44.1 for output
- is AudioConverterFillComplexBuffer the right way to do sample rate
conversion on the iPhone?
2. Run the AU at 44.1 kHz and downsample the mic input to 8 kHz
- can I expect this to work (with upsample) even if the iPhone
hardware can't do 44.1 audio input?
3. Run the AU at 8 kHz and open a separate AudioQueue to play the
44.1 audio
- will this work, or does it run into same obstacle that limits
RemoteIO AU?
4. ???
Also, I noticed that the aurioTouch example implements mute with 0
filled silence buffers. Often my AU will not be recording and playing
simultaneously. Can I toggle kAudioOutputUnitProperty_EnableIO when I
don't need both recording and playout? Or, is that not intended to
change after AudioUnitInitialize()? I presume I would at least have
to stop the AU to change? Or, should I just skip the
AudioUnitRender() call in the mic input callback when I am playing
without record, and fill the output buffer with silence when I am
recording without playout?
Thanks,
Tim
_______________________________________________
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