refactor(tracker): harmonize naming and use iterators in MIDI

using iterators requires go 1.23
This commit is contained in:
5684185+vsariola@users.noreply.github.com
2024-10-14 15:00:55 +03:00
parent 577265b250
commit c07d8000c6
5 changed files with 95 additions and 87 deletions

View File

@ -76,7 +76,7 @@ type (
PlayerMessages chan PlayerMsg
modelMessages chan<- interface{}
MIDI MIDIContexter
MIDI MIDIContext
}
// Cursor identifies a row and a track in a song score.
@ -123,16 +123,15 @@ type (
Dialog int
MIDIContexter interface {
ListInputDevices() <-chan MIDIDevicer
OpenInputDevice(item MIDIDevicer) bool
DestroyContext()
BPM() (bpm float64, ok bool)
NextEvent() (event MIDINoteEvent, ok bool)
MIDIContext interface {
ListInputDevices() func(yield func(MIDIDevice) bool)
Close()
PlayerProcessContext
}
MIDIDevicer interface {
MIDIDevice interface {
String() string
Open() error
}
)