mirror of
https://github.com/onyx-and-iris/voicemeeter.git
synced 2024-11-16 01:50:50 +00:00
d7be997fae
init/end pooler on login, logout
27 lines
370 B
Go
27 lines
370 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
|
|
"github.com/onyx-and-iris/voicemeeter-api-go/voicemeeter"
|
|
)
|
|
|
|
type observer struct{}
|
|
|
|
func (o observer) OnUpdate(subject string) {
|
|
fmt.Println(subject)
|
|
}
|
|
|
|
func main() {
|
|
vmRem := voicemeeter.GetRemote("banana")
|
|
vmRem.Login()
|
|
|
|
o := observer{}
|
|
vmRem.Pooler.Publisher.Register(o)
|
|
|
|
time.Sleep(10 * time.Second)
|
|
|
|
vmRem.Logout()
|
|
}
|