• 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
Re: MIDIPacketListAdd and MIDITimeStamp
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIDIPacketListAdd and MIDITimeStamp


  • Subject: Re: MIDIPacketListAdd and MIDITimeStamp
  • From: Kurt Revis <email@hidden>
  • Date: Sun, 18 Aug 2002 13:27:59 -0700

Assuming that MIDISend doesn't just ignore my timestamps, what are
appropriate values? Or perhaps I need to set the timestamp to zero and
schedule things myself, perhaps with an NSTimer or something?

This is exactly what the timestamps are for! MIDISend will respect the timestamp that you provide. If it's nonzero and in the future, it will schedule the event to be sent at that time.

Use the routines in HostTime.h (in CoreAudio.framework) to get values for a timestamp. For example, if you want to send an event in one second, set a timestamp of (AudioGetCurrentHostTime() + AudioConvertNanosToHostTime(1000000000)).

You can use a timestamp of zero and do the scheduling yourself, but it's tricky. I highly recommend letting CoreMIDI do the scheduling for you, whenever possible.

--
Kurt Revis
email@hidden
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

References: 
 >MIDIPacketListAdd and MIDITimeStamp (From: Andrew Duncan <email@hidden>)

  • Prev by Date: FWADisposeMIDIStream
  • Next by Date: Re: FWADisposeMIDIStream
  • Previous by thread: MIDIPacketListAdd and MIDITimeStamp
  • Next by thread: Re: MIDIPacketListAdd and MIDITimeStamp
  • Index(es):
    • Date
    • Thread