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

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


  • Subject: Re: Is it Possible to Delay the Start of an Input Render Callback?
  • From: Steven Shropshire <email@hidden>
  • Date: Mon, 22 Jul 2013 09:25:21 -0400

You could just do your own bookkeeping for sample time in a post graph render callback and feed silence to all of your inputs until a specified number of frames has elapsed. It isn't pretty but it'll work fine.

Sent from my iPhone

On Jul 21, 2013, at 7:29 PM, n ketter <email@hidden> wrote:

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
References: 
 >Is it Possible to Delay the Start of an Input Render Callback? (From: n ketter <email@hidden>)

  • Prev by Date: Re: pink noise
  • Next by Date: Removal Request initiated by Apple.com?
  • Previous by thread: Is it Possible to Delay the Start of an Input Render Callback?
  • Next by thread: Re: pink noise
  • Index(es):
    • Date
    • Thread