• 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
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]

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


  • Subject: MIDI device/entity/endpoint names formatting on UI and for persistent device references?
  • From: "Ross Bencina" <email@hidden>
  • Date: Thu, 16 Jul 2009 18:09:21 +1000

Hi All

I'm trying to display a list of all MIDI endpoints in a list and I'm having trouble constructing meaningful names. The developer library documentation conflicts with what I've found from experience and what I'm reading on line and I'm confused. Could anyone please confirm a method they use which works well in practice? I have listed the two Apple methods I found below. Is there a list of names which different drivers output for device/entity/endpoint which I could use to validate my code?

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) 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?


The Apple on-line documentation recommends:
>>>
Devices, entities, and endpoints may all have names. The recommended way to display
an endpoint's name is to ask for the endpoint name, and display only that name if
it is unique. If it is non-unique, prepend the device name.
<<<


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
<<<<

That seems logical, but before I push my third attempt onto my users I thought I'd ask here to see if there's an even better way.


Thanks

Ross.

_______________________________________________
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: MIDI device/entity/endpoint names formatting on UI and for persistent device references?
      • From: Brian Willoughby <email@hidden>
    • Re: MIDI device/entity/endpoint names formatting on UI and for persistent device references?
      • From: Doug Wyatt <email@hidden>
  • Prev by Date: Re: is Audio Unit and its View in separate host machines possible?
  • Next by Date: Re: MIDI device/entity/endpoint names formatting on UI and for persistent device references?
  • Previous by thread: Re: Why get Error kAudioUnitErr_CannotDoInCurrentContext when call AudioUnitRender in InputCallback
  • Next by thread: Re: MIDI device/entity/endpoint names formatting on UI and for persistent device references?
  • Index(es):
    • Date
    • Thread