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