Re: Polling a Clock
Re: Polling a Clock
- Subject: Re: Polling a Clock
- From: Jeff Moore <email@hidden>
- Date: Wed, 12 May 2010 12:53:18 -0700
The various render contexts available with our APIs, the system presents you with time stamps that indicate when the buffer of data is going to be heard. Further, these contexts call you on a regular basis. This has been sufficient to enable sample accurate triggering of sample playback for our own AudioUnits and for apps like Logic and what not.
This is what I was referring to when I mentioned tying your polling of the clock to the IO mechanism. Basically, your app's job is to reconcile it's timeline with that of the render context. This can be as simple as saying that time zero is the time of the first IO cycle. From there, knowing how much time has elapsed is a matter of paying attention to the time stamps and counting.
On May 12, 2010, at 12:30 PM, Maximilian Marcoll wrote:
> Hi Jeff, hi all!
>
> Thank you very much for your response!
>
> Indeed, I didn't make it clear why I think I need to do this:
> I'm writing an audio sequencer, with lots of sound-objects (events) to be played at specific points in time.
> Currently, events are placed on a millisecond-grid.
> When playing the sequence of events, I need to trigger them (actually that is: play them) at their respective start time, which is given with millisecond precision.
> I thought a CAClock would be the best choice for such an undertaking.
> But maybe there is some other mechanism for playing back audio-samples at specific time-points?
>
> Thank you!
--
Jeff Moore
Core Audio
Apple
_______________________________________________
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