mirror of
https://github.com/onyx-and-iris/voicemeeter.git
synced 2026-04-18 05:23:31 +00:00
getMidiMessage implemented
midi type added.
This commit is contained in:
28
midi.go
Normal file
28
midi.go
Normal file
@@ -0,0 +1,28 @@
|
||||
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]
|
||||
}
|
||||
Reference in New Issue
Block a user