So for getting the display to be in-sync with the audio, at least
somewhat accurately, how can I check the output device's clock? Is
there some method to do that?
thanks again guys, this is very helpful for me,
On Dec 22, 2008, at 12:59 AM, tahome izwah wrote:
They count the samples that are being shuffled to the output device
and add the sample frames from their sound files in the appropriate
places. You don't need a clock for this at all, just insert the sample
frames from your audio file to the output in your render callback.
Since this is driven by the output devices' clock it is as accurate as
it can get.
2008/12/22 Maissam Barkeshli <email@hidden>:
Thanks for the help.
I'm still a little bit confused though about how this specifically
work. Say I want to do something simple: play a single audio file
second and simultaneously update a visual counter on the GUI.
Right now I'm looking at starting a CoreAudioClock, running a loop
continuously polling the clock to see whether a second has passed
last time. Once at least one second has passed, then play the file
update the display. The problem with this is that even though
is very accurate, the program itself sometimes might actually take
fraction of a second if the computer is busy with other applications.
But people still develop rock-solid metronome applications, with
and everything. How do they do it? The only thing I can think of
making this work is that somehow I need to be using a thread that has
extremely high priority, so that the operating system focuses on this
Perhaps I have settle with not being able to get the display to be
accurate, but with your suggestion I can get the audio to be
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