• 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: MIDIPacketList and MIDIClientDispose questions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIDIPacketList and MIDIClientDispose questions


  • Subject: Re: MIDIPacketList and MIDIClientDispose questions
  • From: Luke Matkins <email@hidden>
  • Date: Mon, 14 Apr 2014 13:41:54 -0700

Hi Volker,

Thanks very much for your response!

1) yes, it’s likely for certain devices. For example when receiving MIDI in your midiInputCallback handler, you can check for the SysEx end byte and continue next time, something like this:

Your example shows sysex messages spread across multiple MIDIPackets -- but can they also span multiple MIDIPacketLists (ie can they be spread over multiple calls to the read proc)? If that's the case, I'll need to use a persistent buffer to keep track of partial messages.

2) I’m not exactly sure, but i guess if you disconnect your connections and clean up your ports etc (MIDIPortDisconnectSource, MIDIPortDispose) no further callbacks should be called. In addition, you can get better control of how the threads execute by having your own runloop, and then call CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, true) inside that loop to get the MIDI ports firing.

That is along the lines of what I'm guessing as well, although my understanding is that the read proc is called from a separate high priority CoreMIDI thread and not the one executing the run loop. In any case, I'd like to be absolutely clear on this point to prevent prematurely freeing memory!

Best,
Luke 
 _______________________________________________
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: MIDIPacketList and MIDIClientDispose questions
      • From: Volker Schumacher <email@hidden>
  • Prev by Date: Re: MIDIPacketList and MIDIClientDispose questions
  • Next by Date: Re: MIDIPacketList and MIDIClientDispose questions
  • Previous by thread: Re: MIDIPacketList and MIDIClientDispose questions
  • Next by thread: Re: MIDIPacketList and MIDIClientDispose questions
  • Index(es):
    • Date
    • Thread