• 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
Is it Possible to Delay the Start of an Input Render Callback?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is it Possible to Delay the Start of an Input Render Callback?


  • Subject: Is it Possible to Delay the Start of an Input Render Callback?
  • From: n ketter <email@hidden>
  • Date: Sun, 21 Jul 2013 16:29:51 -0700

I've built an AUGraph that has an AUFilePlayer connected to an MCMixer unit. I've attached a callback to a second input that feeds samples to the MCMixer. I would like for the callback to wait a predetermined count of samples before feeding the samples to the MCMixer. I thought it would be a simple matter of adding an if statement at the top of the callback, something along the lines of:
if (inTimeStamp->mSampleTime < WAIT_COUNT) 
return noErr;

But apparently mSampleTime's first sample (sample 0) doesn't correspond to the start of the AUGraph. That is, the value of mSampleTime in the first call of my render callback is well past WAIT_COUNT).

As a workaround, in the callback function, I'm padding the first WAIT_COUNT samples w/ zeros and then, once past WAIT_COUNT, I begin passing my 'real' samples.

This seems inelegant and inefficient. Is there another way to do this that I'm not privy to?

Should I be using AUScheduledSoundPlayer instead?

Thanks in advance
n
 _______________________________________________
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: Is it Possible to Delay the Start of an Input Render Callback?
      • From: Steven Shropshire <email@hidden>
  • Prev by Date: Would you please help us with this new survey for an audio software startup?
  • Next by Date: Re: pink noise
  • Previous by thread: Would you please help us with this new survey for an audio software startup?
  • Next by thread: Re: Is it Possible to Delay the Start of an Input Render Callback?
  • Index(es):
    • Date
    • Thread