simultaneous record/play at different sample rates on iPhone
simultaneous record/play at different sample rates on iPhone
- Subject: simultaneous record/play at different sample rates on iPhone
- From: Tim <email@hidden>
- Date: Thu, 06 May 2010 20:53:12 -0700
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