Re: MIDIGetSource
Re: MIDIGetSource
- Subject: Re: MIDIGetSource
- From: Doug Wyatt <email@hidden>
- Date: Mon, 23 Sep 2002 15:33:06 -0700
On Saturday, Sep 21, 2002, at 15:10 US/Pacific, email@hidden wrote:
I'm confused about MIDIGetSource. The docs say that MIDIGetSource won't
return offline
devices, to quote:
"while iterations through the system's sources and destinations will
not include the endpoints of offline devices."
But my offline MIDI device is still showing up as a source.
What are you using to determine that the device is offline?
Try:
SInt32 offline;
OSStatus err = MIDIObjectGetIntegerProperty(theProblemMIDISource,
kMIDIPropertyOffline,
&offline);
(the source should inherit this property from the device)
To double check:
MIDIEntityRef theEntity;
err = MIDIEndpointGetEntity(theProblemMIDISource, &theEntity);
MIDIDeviceRef theDevice;
err = MIDIEntityGetDevice(theEntity, &theDevice);
OSStatus err = MIDIObjectGetIntegerProperty(theDevice,
kMIDIPropertyOffline,
&offline);
Do you get any errors? Is the offline property any different for the
device and endpoint?
What is the device?
Also how are multi port devices supposed to be detected. I've got a
MIDISport 2x2 that shows
up as a single MIDISource, yet it has two ports. OK, correction now
it's showing up as two ports
(after I restarted MIDI with MIDI Monitor.)
However after turning off and turning on my MK-225C it's now showing up
as nameless in my app and in MIDI Monitor.
OK, now I know that's an Evolution keyboard :-)
There's a bug (to be fixed soon I hope) where single-entity USB
class-compliant devices don't get names.
Why does MIDIGetSource give such varying responses? Should I be using
something else?
You're either doing something subtly wrong or hitting an edge case of
some sort ... with specifics we should be able to debug this.
Doug
--
Doug Wyatt
work: email@hidden (CoreAudio)
personal: email@hidden
http://www.sonosphere.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.