Hi Steven,
Thanks for the great question. I should have included this the
program. Next version.
There’s an example of using an AU effect (highpass filter) on the mixer
input bus with the fileplayer audioUnit in the program.
Running it from the mic to a input channel on the mixer is very
similar.
If you are not using a callback on the mic input...
1. Set the asbd for the rio input bus (output scope) to the match the au
effects unit asbd (auEffectStreamFormat)
2. Also set the same asbd (auEffectStreamFormat) on the input and output
scope of the au effects unit
3. connect the nodes in the processing graph:
a. rio node source output # 1 –> au effect node dest
input # 0
b. au effect node source output # 0 –>
multichannel mixer node dest input channel number
I tried this with the highpass filter and it worked fine. The peak
limiter passed audio through ok but I didn’t test any parameters.
If you are using a callback on the mic input... For example, if you want
the callack on the input of the auEffect, then do the same as above but don’t
make the graph connection from rio to effect node (step 3.a). And install
the callback on the input of the au effect.
By the way, if you set up a callback this way the samples from the mic are
automatically converted to stereo 32bit float, non interleaved. Because that’s
what the AU effect is pulling in. Will wonders never cease?
Tom
Sent: Thursday, December 15, 2011 6:20 AM
Subject: RE: IOS AUGraph: record mic and play file
Thanks Tom, that project is a great learning
resource, a lot of things make more sense now.
One thing that I'm still having difficulty with
is connecting anything to an effect unit (limiter). I know it is all there in
your example but I can't see anything special being done, except maybe placing
it after the mixer which maybe handles implicit format conversions? I have tried
a converter unit to go from mic out format to float but it still fails when
initialising the graph.
My failure to be able incorporate an effect unit
makes me wonder if I was lucky getting the rest of the graph to work (mic, file
player, mixer, out), despite thinking I knew what I was doing.
From: email@hidden
To: email@hidden;
email@hidden
Subject: Re: IOS AUGraph: record mic and play
file
Date: Mon, 12 Dec 2011 10:30:19 -0500
Hi Steven,
You will find example code to do what you are looking for. Or read this
entry from Chris Adamson’s blog for the real story:
Basic steps (in addition to what you already have):
- set audio session category to AVAudioSessionCategoryPlayAndRecord,
- set ASBD stream formats on the remote IO input scope output bus
(and output scope input bus)
- make AUgraph connections or assign a callback.
Tom
Sent: Monday, December 12, 2011 8:33 AM
Subject: IOS AUGraph: record mic and play file
I have an AUgraph containing an AudioFilePlayer and a RemoteIO node,
playback is ok. Is it possible using the same graph/remoteIO to access samples
from the microphone?
I think i know how to access microphone samples using a standalone
remoteIO, not part of a graph that is also playing other audio.
Any suggestions are appreciated.
_______________________________________________
Do not post admin requests to
the list. They will be ignored.
Coreaudio-api mailing
list
(email@hidden)
Help/Unsubscribe/Update your
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
email sent to email@hidden