mirror of
https://github.com/vsariola/sointu.git
synced 2025-07-18 21:14:31 -04:00
refactor(tracker): harmonize naming and use iterators in MIDI
using iterators requires go 1.23
This commit is contained in:
parent
577265b250
commit
c07d8000c6
@ -445,11 +445,14 @@ func (m *Model) Cancel() Action { return Allow(func() { m.dialog = NoDialog
|
||||
func (m *Model) Export() Action { return Allow(func() { m.dialog = Export }) }
|
||||
func (m *Model) ExportFloat() Action { return Allow(func() { m.dialog = ExportFloatExplorer }) }
|
||||
func (m *Model) ExportInt16() Action { return Allow(func() { m.dialog = ExportInt16Explorer }) }
|
||||
func (m *Model) SelectMidiInput(item MIDIDevicer) Action {
|
||||
func (m *Model) SelectMidiInput(item MIDIDevice) Action {
|
||||
return Allow(func() {
|
||||
if !m.MIDI.OpenInputDevice(item) {
|
||||
message := fmt.Sprintf("Could not open MIDI device %s\n", item)
|
||||
if err := item.Open(); err != nil {
|
||||
message := fmt.Sprintf("Could not open MIDI device: %s", item)
|
||||
m.Alerts().Add(message, Error)
|
||||
} else {
|
||||
message := fmt.Sprintf("Opened MIDI device: %s", item)
|
||||
m.Alerts().Add(message, Info)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user