• 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
cleanly finishing a recording cycle on the iPhone - best practice?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cleanly finishing a recording cycle on the iPhone - best practice?


  • Subject: cleanly finishing a recording cycle on the iPhone - best practice?
  • From: Wil Macaulay <email@hidden>
  • Date: Sat, 21 Nov 2009 09:52:43 -0500

I'm implementing a mini-sampler on the iPhone, which involves
a click track and a number of backup tracks.  When recording,
I need to record an exact number of samples, after 4 beats pre-roll.


My current implementation is straightforward:

- calculate the number of samples to discard and to record
  based on sample rate and time
- use ExtAudio to open a file for recording
- construct an AUGraph with RemoteIO and a multi-channel mixer,
- the renderProc for the mixer pulls the pre-recorded samples for the
backup and  click track
- the inputProc
         - pulls the samples from RemoteIO
        -  discards samples until the pre-roll time is done
        -  asynchronously writes to the file
        - if the recording time is done,
                   - stops the AUGraph
                   - calls ExtAudioDispose to ensure the file is written.

my question is:
   is it safe to call AUGraphStop from the input procedure?
   is it safe to call ExtAudioDispose from the input procedure?

what is the right way to signal the UI thread that recording is stopped so
I can re-enable playback, etc? or should I just have a separate timer?

thanks

wil
 _______________________________________________
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: cleanly finishing a recording cycle on the iPhone - best practice?
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: Choosing an AU base class
  • Next by Date: WaveformViewDemo
  • Previous by thread: Re: Choosing an AU base class
  • Next by thread: Re: cleanly finishing a recording cycle on the iPhone - best practice?
  • Index(es):
    • Date
    • Thread