Вопрос

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