Re: How to remember the MIDIEndpoint after reboot
Re: How to remember the MIDIEndpoint after reboot
- Subject: Re: How to remember the MIDIEndpoint after reboot
- From: Philippe Wicker <email@hidden>
- Date: Sun, 15 Jun 2003 12:48:23 +0200
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
_______________________________________________
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.