• 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: How to capture audio generated by a render callback, iOS
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to capture audio generated by a render callback, iOS


  • Subject: Re: How to capture audio generated by a render callback, iOS
  • From: Paul Davis <email@hidden>
  • Date: Mon, 03 Dec 2012 14:51:41 -0500




On Mon, Dec 3, 2012 at 12:49 PM, Gregory Wieber <email@hidden> wrote:
Perhaps this will help:

https://developer.apple.com/library/ios/#documentation/MusicAudio/Reference/ExtendedAudioFileServicesReference/Reference/reference.html

In particular, I'd check out ExtAudioFileWriteAsync. 

this MUST Not be called inside a render callback.

you need your own AU with its own render callback which writes (copies) incoming data to a lock free ring buffer and another thread which pulls from that buffer and writes to disk.

if you do the disk i/o from within inside the render callback, it might work but you are violating all  the rules of realtime audio programming in general and AU programming in particular.
 


On Sun, Dec 2, 2012 at 12:51 PM, Tim Kemp <email@hidden> wrote:
Hi,

My iOS synth has an AUGraph like this:

(Render callback on bus 0 input)->MultiChannelMixer->RemoteIO

(There will be a file player unit also going in to the mixer.)

The render callback gets samples in realtime from the synth engine as the user plays. I now want to record the generated sound to disk. What's the best way to hook this up? I am writing generated samples to a ring buffer already; I just need something to take them and put them in a file. Obviously this is a low priority process, so I'm not sure that I should be doing it within the render callback. (I also don't see anywhere to add a recording AU into the AUGraph; I am targeting iOS 5.0+ so I don't have a matrix mixer, which is what I originally thought of.) Should I add a render notify to the RemoteIO unit?

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


 _______________________________________________
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


 _______________________________________________
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: How to capture audio generated by a render callback, iOS
      • From: Paul Davis <email@hidden>
References: 
 >How to capture audio generated by a render callback, iOS (From: Tim Kemp <email@hidden>)
 >Re: How to capture audio generated by a render callback, iOS (From: Gregory Wieber <email@hidden>)

  • Prev by Date: Re: How to capture audio generated by a render callback, iOS
  • Next by Date: Re: How to capture audio generated by a render callback, iOS
  • Previous by thread: Re: How to capture audio generated by a render callback, iOS
  • Next by thread: Re: How to capture audio generated by a render callback, iOS
  • Index(es):
    • Date
    • Thread