Skip to content

Commit

Permalink
LibreMidiAccess: implement canCreateVirtualPort().
Browse files Browse the repository at this point in the history
  • Loading branch information
atsushieno committed Sep 3, 2024
1 parent d67db49 commit 9d85910
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,12 @@ class LibreMidiAccess(private val api: Int) : MidiAccess() {

// Input/Output

override fun canCreateVirtualPort(context: PortCreatorContext) =
when(api) {
API.AlsaSeqUmp, API.CoreMidiUmp, API.WindowsMidiServices -> context.midiProtocol == MidiTransportProtocol.UMP
else -> context.midiProtocol == MidiTransportProtocol.MIDI1
}

override val canCreateVirtualPort: Boolean
get() = when(api) {
API.AlsaSeq, API.CoreMidi, API.AlsaSeqUmp, API.CoreMidiUmp, API.WindowsMidiServices -> true
Expand Down

0 comments on commit 9d85910

Please sign in to comment.