• 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
MusicPlayer synchronization with QuickTime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

  • Follow-Ups:
    • Re: MusicPlayer synchronization with QuickTime
      • From: William Stewart <email@hidden>
  • Prev by Date: Re: Synchronizing with the actual USB device audio clock
  • Next by Date: Writing a private device driver
  • Previous by thread: Re: asynchronous change of kAudioStreamPropertyPhysicalFormat
  • Next by thread: Re: MusicPlayer synchronization with QuickTime
  • Index(es):
    • Date
    • Thread