Skip to content

MIKMIDIClientSourceEndpoint and MIKMIDIClientDestinationEndpoint virtual endpoints appear in the list of virtual endpoints with their roles reversed #340

Open
@makaGeorge

Description

@makaGeorge

When I create both a virtual endpoint using MIKMIDIClientSourceEndpoint (which as documented creates an endpoint that lets you send MIDI out of your app) and a virtual endpoint using MIKMIDIClientDestinationEndpoint (which is used to receive MIDI data into the app) it seems they get automatically grouped together but in reversed roles.

This is how I declare the virtual endpoints:

virtualInput = MIKMIDIClientDestinationEndpoint(name: "Virtual Input", receivedMessagesHandler: listenVirtualBlock)
 let error:NSErrorPointer = NSErrorPointer(nilLiteral: ())
 virtualOutput = MIKMIDIClientSourceEndpoint(name: "Virtual Output", error: error)

First I see a call to connectionManager(_:shouldConnectToNewlyAddedDevice:) with the following device:

<MIKMIDIDevice: 0x280891b40> Virtual:
        Entities: {
            <MIKMIDIEntity: 0x280891ac0> Virtual Output:
        Sources: {
            <MIKMIDISourceEndpoint: 0x281359290> Virtual Output,
        }
        Destinations: {
            <MIKMIDIDestinationEndpoint: 0x281359560> Virtual Input,
        },
        }

And then when I go through the list of virtual endpoints from MIKMIDIDeviceManager.shared.virtualSources / MIKMIDIDeviceManager.shared.virtualDestinations, they appear also in reversed roles.

[<MIKMIDISourceEndpoint: 0x281348c60> Network Session 1, <MIKMIDISourceEndpoint: 0x2813b5860> Virtual Output]

[<MIKMIDIDestinationEndpoint: 0x2813b5980> Network Session 1, <MIKMIDIDestinationEndpoint: 0x28136ce40> Virtual Input]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions