• 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 device/entity/endpoint names formatting on UI and for persistent device references?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MIDI device/entity/endpoint names formatting on UI and for persistent device references?


  • Subject: Re: MIDI device/entity/endpoint names formatting on UI and for persistent device references?
  • From: Doug Wyatt <email@hidden>
  • Date: Thu, 16 Jul 2009 10:11:11 -0700

On Jul 16, 2009, at 1:09 , Ross Bencina wrote:
Also, although I understand the abstractions, I'm a little unclear on the uniqueness criteria for the different device/entity/endpoint names. If there are two of the same type of MIDI device connected, can I rely on Core Audio to guarantee that their device names will be unique (e.g. does it append a number or something)

no

or do I need to use something other than their names to uniquely identify them? Are entity names within a device required to be unique or should I be encoding the indexes for persistent reference?

there is no requirement of uniqueness but it's probably a bad choice if a driver developer is doing that



Then I found this:
Technical Q&A QA1374
Obtaining the name of an external MIDI Device from a MIDI Endpoint
http://developer.apple.com/qa/qa2004/qa1374.html

Which suggests a more complex algorithm:


if device.entityCount < 2:
return device.name
else
s = endpoint.name.isEmpty ? entity.name : endpoint.name
if s.beginsWith( device.name ):
  return s
else:
  return device.name + " " + s
<<<<

You could use kMIDIPropertyDisplayName, which does all that for you.

Doug


_______________________________________________ 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
References: 
 >MIDI device/entity/endpoint names formatting on UI and for persistent device references? (From: "Ross Bencina" <email@hidden>)

  • Prev by Date: MIDI device/entity/endpoint names formatting on UI and for persistent device references?
  • Next by Date: seeking with aqofflinerender
  • Previous by thread: MIDI device/entity/endpoint names formatting on UI and for persistent device references?
  • Next by thread: Re: MIDI device/entity/endpoint names formatting on UI and for persistent device references?
  • Index(es):
    • Date
    • Thread