Skip to content

Commit

Permalink
LibreMidiAccess: virtual out ports are working too.
Browse files Browse the repository at this point in the history
  • Loading branch information
atsushieno committed Sep 3, 2024
1 parent 83c8f43 commit e79970f
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit e79970f

Please sign in to comment.