Skip to content

Commit e79970f

Browse files
committed
LibreMidiAccess: virtual out ports are working too.
1 parent 83c8f43 commit e79970f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ktmidi-jvm-desktop/src/jvmMain/kotlin/dev/atsushieno/ktmidi/LibreMidiAccess.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,12 +181,12 @@ class LibreMidiAccess(private val api: Int) : MidiAccess() {
181181
private var nextVirtualPortIndex = 0
182182
override suspend fun createVirtualInputSender(context: PortCreatorContext): MidiOutput {
183183
val midiConfig = libremidi_midi_configuration().also {
184-
it.port_name(BytePointer(context.portName))
185184
checkReturn { library.libremidi_midi_configuration_init(it) }
185+
it.port_name(BytePointer(context.portName))
186186
it.virtual_port(true)
187187
}
188188
val midiOut = libremidi_midi_out_handle().also {
189-
//checkReturn { library.libremidi_midi_out_new(midiConfig, apiConfig, it) }
189+
checkReturn { library.libremidi_midi_out_new(midiConfig, apiConfig, it) }
190190
}
191191
val idName = "VIn_${nextVirtualPortIndex++}"
192192
val portDetails = LibreMidiPortDetails(this, idName, context.portName)

0 commit comments

Comments
 (0)