문제

I'm trying to distinguish between "Virtual" and "Non-Virtual" MIDIEndpointRefs in my iOS app.

The MIDIObjectType enum seems to be the place to look, but as far as I can tell, this property is not something I can query.

Any advice?

도움이 되었습니까?

해결책 2

Here's the solution I was pointed to on the OMAC google group (thanks Jesse Chappell

static BOOL isVirtualEndpoint(MIDIEndpointRef ref)
{
    MIDIEntityRef entity = 0;

    MIDIEndpointGetEntity(ref, &entity);
    if (entity) 
    {
        return NO;
    }
    else 
    {
    return YES;
    }
}

다른 팁

Starting with the MIDIEndpointRef, try using MIDIEndpointGetEntity and then MIDIEntityGetDevice to find a device. If the entity or device are nil, then the endpoint is probably "virtual".

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top