MusicPlayer synchronization with QuickTime
MusicPlayer synchronization with QuickTime
- Subject: MusicPlayer synchronization with QuickTime
- From: Edwin Vane <email@hidden>
- Date: Mon, 26 Dec 2005 11:52:35 -0500
- Mail-followup-to: CoreAudio/Midi List <email@hidden>
Hi,
I wrote to this list a while back about using the MusicPlayer API to
play MIDI events that were fed to it by QuickTime with the goal of
synchronizing other time-based media in QuickTime with synthesized
music.
Anyway, after finally implementing a prototype, I've come across a
problem. MusicPlayer runs according to its own clock and to keep it in
tandem with QuickTime, I keep calling MusicPlayerSetTime(). However, the
times I get from QuickTime during the MediaIdle() function always seem
to be about 20ms faster than the MusicPlayer and so calling
MusicPlayerSetTime() causes MusicPlayer to jump forward in small steps
all the time, causing notes to be missed.
I have some further research to do into the 20ms difference (which appears
regardless of if I continually call MusicPlayerSetTime() in
MediaIdle()). However, I'd like to know if there's anything in the
MusicPlayer API for providing synchronization that is better than
calling MusicPlayerSetTime() all the timer? My looking at the header file
didn't reveal such functionality.
I've imagiend a fix where I monitor synchronization between QuickTime and
MusicPlayer and if a threshold is passed, then either MusicPlayer's rate
is imperceptably increased or decreased until synchronization is ok
again.
I'd be interested in comments in suggestions.
--
Edwin Vane
MMath Candidate
Computer Graphics Lab
School of Computer Science
University of Waterloo
_______________________________________________
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