• 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: MIDI source unique IDs (was Names for MIDI sources)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIDI source unique IDs (was Names for MIDI sources)


  • Subject: Re: MIDI source unique IDs (was Names for MIDI sources)
  • From: Pete Yandell <email@hidden>
  • Date: Mon, 18 Feb 2002 21:26:19 +1100

On Monday, February 18, 2002, at 12:50 PM, Doug Wyatt wrote:

Herbie Robinson explained why you need to use both -- if the object vanishes, it's very useful to the user if you still know its name. But make the uniqueID the primary binding; it allows for objects to be renamed.

Yep, you're right. Saving the name as well as the ID also makes things work just fine even if the ID changes, such as when you switch machines or reinstall stuff. So I agree: apps should have to save name and unique ID. Standard policy should be to try to match the ID then, if that fails, the name.

When an app first creates a source, that source should get a system allocated unique ID. (Apparently this is supposed to happen, but the current version of CoreMIDI has a bug.)

The app can save that unique ID and, when restarted, request that unique ID back again. The current method of setting the unique ID of the source after creating works fine for this.

I think that might be okay, though I might still write-protect that property from clients other than the one that created it. And of course, there would have to be validation of the uniqueID.

Yep, sounds sensible, although if apps are saving names then it all becomes less of an issue.

Now a question: do offline devices hang around in the device tree forever, get reset on reboots, timeout after a certain time...?

They hang around until a hypothetical studio setup editor deletes them -- IMHO the system shouldn't be presuming to be able to tell the difference between a device that is powered off vs. a device that the user borrowed and will never see again. I think there are some comments about this in the docs in MIDIDriver.h and MIDISetup.h.

OK, a lot has been said about this "hypothetical studio setup editor". In an effort to make it less hypothetical and more actual, I'd like to have a go at writing something like this. It seems to me, however, that the APIs aren't all there for it. In particular:
- How would I do what you describe above and delete an offline device?
- The MIDIGetNumberOfExternalDevices implies the existence of external device nodes somehow associated with endpoints. How does one create these, set their properties, get at them, etc?

Pete Yandell
http://pete.yandell.com/


________________________________________________________________________
This email has been scanned for all viruses by the MessageLabs SkyScan
service. For more information on a proactive anti-virus service working
around the clock, around the globe, visit http://www.messagelabs.com
________________________________________________________________________
_______________________________________________
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: MIDI source unique IDs (was Names for MIDI sources) (From: Doug Wyatt <email@hidden>)

  • Prev by Date: Re: Questions on data in MIDIPackets
  • Next by Date: Re: Sound Manager & MIDI callbacks, interrupts and threads
  • Previous by thread: Re: MIDI source unique IDs (was Names for MIDI sources)
  • Next by thread: MIDITimeStamp ?
  • Index(es):
    • Date
    • Thread