voicemeeter/midi.go
onyx-and-iris 69476ffcd9 getMidiMessage implemented
midi type added.
2022-08-22 22:28:11 +01:00

29 lines
377 B
Go

package voicemeeter
var midi *midi_t
type midi_t struct {
channel int
current int
cache map[int]int
}
func newMidi() *midi_t {
if midi == nil {
midi = &midi_t{0, 0, map[int]int{}}
}
return midi
}
func (m *midi_t) Channel() int {
return m.channel
}
func (m *midi_t) Current() int {
return m.current
}
func (m *midi_t) Get(key int) int {
return m.cache[key]
}