Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
makaGeorge opened this issue Jun 21, 2022 · 0 comments

Comments

@makaGeorge
Copy link

makaGeorge commented Jun 21, 2022

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]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant