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

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


  • Subject: Re: cleanly finishing a recording cycle on the iPhone - best practice?
  • From: Wil Macaulay <email@hidden>
  • Date: Mon, 23 Nov 2009 16:40:52 -0500

Thanks for the quick response, Bill.  Sounds like I should have a
timer thread in my application that
calls AUGraphIsRunning after an appropriate delay, and then calls
ExtAudioFileDispose in the main thread?


wil

On Mon, Nov 23, 2009 at 4:09 PM, William Stewart <email@hidden> wrote:
>
> On Nov 21, 2009, at 6:52 AM, Wil Macaulay wrote:
>
>> 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
>
> that's ok
>
>>                  - calls ExtAudioDispose to ensure the file is written.
>
> nope - any disposal or allocation of memory shouldn't be done on the audio
> I/O thread
>
>>
>> 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
>
>
 _______________________________________________
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:
    • DLS synth stops responding to note events??
      • From: Scott Burgess <email@hidden>
References: 
 >cleanly finishing a recording cycle on the iPhone - best practice? (From: Wil Macaulay <email@hidden>)
 >Re: cleanly finishing a recording cycle on the iPhone - best practice? (From: William Stewart <email@hidden>)

  • Prev by Date: Re: AU Lab 2.0.1
  • Next by Date: DLS synth stops responding to note events??
  • Previous by thread: Re: cleanly finishing a recording cycle on the iPhone - best practice?
  • Next by thread: DLS synth stops responding to note events??
  • Index(es):
    • Date
    • Thread