cleanly finishing a recording cycle on the iPhone - best practice?
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