mirror of
https://github.com/onyx-and-iris/voicemeeter.git
synced 2024-11-22 12:50:53 +00:00
only check subject once per update
This commit is contained in:
parent
fa8e9f3e76
commit
7f992a1a87
@ -23,16 +23,13 @@ func (o observer) Deregister() {
|
|||||||
func (o observer) OnUpdate(subject string) {
|
func (o observer) OnUpdate(subject string) {
|
||||||
if subject == "pdirty" {
|
if subject == "pdirty" {
|
||||||
fmt.Println("pdirty!")
|
fmt.Println("pdirty!")
|
||||||
}
|
} else if subject == "mdirty" {
|
||||||
if subject == "mdirty" {
|
|
||||||
fmt.Println("mdirty!")
|
fmt.Println("mdirty!")
|
||||||
}
|
} else if subject == "midi" {
|
||||||
if subject == "midi" {
|
|
||||||
var current = o.vm.Midi.Current()
|
var current = o.vm.Midi.Current()
|
||||||
var val = o.vm.Midi.Get(current)
|
var val = o.vm.Midi.Get(current)
|
||||||
fmt.Printf("Value of midi button %d: %d\n", current, val)
|
fmt.Printf("Value of midi button %d: %d\n", current, val)
|
||||||
}
|
} else if subject == "ldirty" {
|
||||||
if subject == "ldirty" {
|
|
||||||
fmt.Printf("%v %v %v %v %v %v %v %v\n",
|
fmt.Printf("%v %v %v %v %v %v %v %v\n",
|
||||||
o.vm.Bus[0].Levels().IsDirty(),
|
o.vm.Bus[0].Levels().IsDirty(),
|
||||||
o.vm.Bus[1].Levels().IsDirty(),
|
o.vm.Bus[1].Levels().IsDirty(),
|
||||||
|
Loading…
Reference in New Issue
Block a user