mirror of
https://github.com/onyx-and-iris/voicemeeter.git
synced 2024-11-21 12:20:55 +00:00
add Run() to Remote type. Launches Voicemeeter GUI
pooler no longer defined as singleton
This commit is contained in:
parent
68e9654502
commit
2a9b925623
28
publisher.go
28
publisher.go
@ -75,22 +75,20 @@ type pooler struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func newPooler(k *kind) *pooler {
|
func newPooler(k *kind) *pooler {
|
||||||
if p == nil {
|
p = &pooler{
|
||||||
p = &pooler{
|
k: k,
|
||||||
k: k,
|
run: true,
|
||||||
run: true,
|
event: newEvent(),
|
||||||
event: newEvent(),
|
pdirtyDone: make(chan bool),
|
||||||
pdirtyDone: make(chan bool),
|
mdirtyDone: make(chan bool),
|
||||||
mdirtyDone: make(chan bool),
|
midiDone: make(chan bool),
|
||||||
midiDone: make(chan bool),
|
ldirtyDone: make(chan bool),
|
||||||
ldirtyDone: make(chan bool),
|
|
||||||
}
|
|
||||||
go p.done()
|
|
||||||
go p.parameters()
|
|
||||||
go p.macrobuttons()
|
|
||||||
go p.midi()
|
|
||||||
go p.levels()
|
|
||||||
}
|
}
|
||||||
|
go p.done()
|
||||||
|
go p.parameters()
|
||||||
|
go p.macrobuttons()
|
||||||
|
go p.midi()
|
||||||
|
go p.levels()
|
||||||
return p
|
return p
|
||||||
}
|
}
|
||||||
|
|
||||||
|
11
remote.go
11
remote.go
@ -55,6 +55,17 @@ func (r *Remote) InitPooler() {
|
|||||||
r.pooler = newPooler(r.Kind)
|
r.pooler = newPooler(r.Kind)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Run launches the Voicemeeter GUI for a kind.
|
||||||
|
func (r *Remote) Run(kindId string) error {
|
||||||
|
err := runVoicemeeter(kindId)
|
||||||
|
if err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
time.Sleep(time.Second)
|
||||||
|
clear()
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
// Type returns the type of Voicemeeter (basic, banana, potato)
|
// Type returns the type of Voicemeeter (basic, banana, potato)
|
||||||
func (r *Remote) Type() string {
|
func (r *Remote) Type() string {
|
||||||
val, err := getVMType()
|
val, err := getVMType()
|
||||||
|
Loading…
Reference in New Issue
Block a user