• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: IOS AUGraph: record mic and play file
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: IOS AUGraph: record mic and play file


  • Subject: Re: IOS AUGraph: record mic and play file
  • From: tom zicarelli <email@hidden>
  • Date: Thu, 15 Dec 2011 15:20:31 -0500
  • Importance: Normal

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
 
 
From: steven hooley
Sent: Thursday, December 15, 2011 6:20 AM
To: email@hidden
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,
 
Check out the open source project I posted last week: http://zerokidz.com/audiograph
 
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:
 
http://www.subfurther.com/blog/2009/04/28/an-iphone-core-audio-brain-dump/
 
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
 
 
From: steven hooley
Sent: Monday, December 12, 2011 8:33 AM
To: email@hidden
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
 _______________________________________________
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

  • Follow-Ups:
    • Re: IOS AUGraph: record mic and play file
      • From: Paul Davis <email@hidden>
References: 
 >IOS AUGraph: record mic and play file (From: steven hooley <email@hidden>)
 >Re: IOS AUGraph: record mic and play file (From: tom zicarelli <email@hidden>)
 >RE: IOS AUGraph: record mic and play file (From: steven hooley <email@hidden>)

  • Prev by Date: Stereo recording with remoteIO - how?
  • Next by Date: SampleUSBAudioPlugin buffer sizes
  • Previous by thread: RE: IOS AUGraph: record mic and play file
  • Next by thread: Re: IOS AUGraph: record mic and play file
  • Index(es):
    • Date
    • Thread