Re: MIDIObjectGetProperties returning err -50 on virtual MIDI port
Re: MIDIObjectGetProperties returning err -50 on virtual MIDI port
- Subject: Re: MIDIObjectGetProperties returning err -50 on virtual MIDI port
- From: Doug Wyatt <email@hidden>
- Date: Tue, 8 Nov 2011 14:59:39 -0800
As horribly pernicious as error -50 is, it almost always means that a function argument is null and shouldn't be null, or, in the case of API's that use object identifiers (not to be confused with Objective C id's) instead of pointers (MIDIObjectRef is such a type), the ID doesn't point to a valid object.
In this case, entity is probably NULL. Virtual endpoints don't have entities.
You want the endpoint's name? Just ask for kMIDIPropertyDisplayName on the endpoint.
On Nov 8, 2011, at 14:35 , Michael Tyson wrote:
> Hi again - two questions in one day, I'm getting greedy =)
>
> I'm using Pete Goodliffe's PGMidi utility to skip some of the legwork on my MIDI implementation. I'm having an issue identifying the name of virtual MIDI ports - I have MoDrum running in the background on my iPhone (running iOS 5), and its port is showing up, but the call to MIDIObjectGetProperties is returning -50, somewhat unhelpfully.
>
> MIDIEndpointRef new_endpoint; // = result of MIDIGetDestination(index)
>
> MIDIEntityRef entity = 0;
> MIDIEndpointGetEntity(new_endpoint, &entity);
>
> CFPropertyListRef properties = nil;
> OSStatus s = MIDIObjectGetProperties(entity, &properties, true);
>
> // s is -50 when called on the MoDrum endpoint
>
> Anyone have a clue why?
_______________________________________________
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