• 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: How to remember the MIDIEndpoint after reboot
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to remember the MIDIEndpoint after reboot


  • Subject: Re: How to remember the MIDIEndpoint after reboot
  • From: Herbie Robinson <email@hidden>
  • Date: Mon, 16 Jun 2003 03:04:03 -0400

On Sunday, June 15, 2003, at 12:19 PM, Nobuyasu Jinnai/神内伸恭 wrote:

Dir sir

Thank you for your answer.

It depends of the "entity" to which the endpoint was related. If the
"entity" is a non persistent virtual source /destination created by
some MIDI app, then the life time of the endpoint ref is the life time
of the app. You may try this little "command line" program which shows
Then how can I persist the MIDI physical devices?
I can ignore the vertual source.

The same way as for non persistent endpoints. The unique ID is
relevant for every kind of MIDI object. You can save all the "opened"
objects ID and just try to reopen them when you restart your app using
such code as the following:

OSStatus status ;
MIDIObjectRef outObject ;
MIDIObjectType outObjectType ;
status = MIDIObjectFindByUniqueID (<ID of the object to find>,
&outObject, &outObjectType);
if (status != noErr) {
// Something went wrong
if (status == kMIDIObjectNotFound) {
// The object does not exist anymore (non persistent or bad ID)
}
else if (status == ...) {
}
etc ....
}

Philippe Wicker
email@hidden

It's best to save both the Unique ID and the text name of the endpoint. The text can be used to remind the user what the connection was if the studio gets rearranged the Unique ID stops working. I can tell you from experience that this is REALLY helpful to the user when bringing up old documents after the studio has been rearranged.

You can put up a dialog when the document is opening showing what the device used to be and asking for a new selection (using the text to pick a default if you can).

That UI is acceptable, but a little annoying. If you are using pop-up menus, A better UI (IMO) is to show the old device name in italics with a question mark (or something distinctive) where the user normally selects it. If the text matches an existing device, the pop-up would start at that device (so, the user can confirm just by clicking on the field).
_______________________________________________
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: 
 >Re: How to remember the MIDIEndpoint after reboot (From: Philippe Wicker <email@hidden>)

  • Prev by Date: Double-free in DLS unitialize
  • Next by Date: WWDC 407 - Audio Overview: Mac OS X Audio Rocks!
  • Previous by thread: Re: How to remember the MIDIEndpoint after reboot
  • Next by thread: Re: How to remember the MIDIEndpoint after reboot
  • Index(es):
    • Date
    • Thread