From e79970f687f1a538e6ed9d9fc91b9951cd97d93d Mon Sep 17 00:00:00 2001 From: Atsushi Eno Date: Tue, 3 Sep 2024 16:24:22 +0800 Subject: [PATCH] LibreMidiAccess: virtual out ports are working too. --- .../jvmMain/kotlin/dev/atsushieno/ktmidi/LibreMidiAccess.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ktmidi-jvm-desktop/src/jvmMain/kotlin/dev/atsushieno/ktmidi/LibreMidiAccess.kt b/ktmidi-jvm-desktop/src/jvmMain/kotlin/dev/atsushieno/ktmidi/LibreMidiAccess.kt index cfeb4abe4..b1dcb53b7 100644 --- a/ktmidi-jvm-desktop/src/jvmMain/kotlin/dev/atsushieno/ktmidi/LibreMidiAccess.kt +++ b/ktmidi-jvm-desktop/src/jvmMain/kotlin/dev/atsushieno/ktmidi/LibreMidiAccess.kt @@ -181,12 +181,12 @@ class LibreMidiAccess(private val api: Int) : MidiAccess() { private var nextVirtualPortIndex = 0 override suspend fun createVirtualInputSender(context: PortCreatorContext): MidiOutput { val midiConfig = libremidi_midi_configuration().also { - it.port_name(BytePointer(context.portName)) checkReturn { library.libremidi_midi_configuration_init(it) } + it.port_name(BytePointer(context.portName)) it.virtual_port(true) } val midiOut = libremidi_midi_out_handle().also { - //checkReturn { library.libremidi_midi_out_new(midiConfig, apiConfig, it) } + checkReturn { library.libremidi_midi_out_new(midiConfig, apiConfig, it) } } val idName = "VIn_${nextVirtualPortIndex++}" val portDetails = LibreMidiPortDetails(this, idName, context.portName)