NewRemote now accepts delay param

getters clear dirty params sync enabled.

examples and tests updated
This commit is contained in:
onyx-and-iris
2022-09-14 16:05:15 +01:00
parent a4b84f289e
commit 8ca545b1c4
7 changed files with 41 additions and 57 deletions

View File

@@ -2,31 +2,25 @@ package voicemeeter_test
import (
"log"
"os"
"testing"
"time"
"github.com/onyx-and-iris/voicemeeter-api-go"
)
var (
vm, err = voicemeeter.NewRemote("potato")
vm, err = voicemeeter.NewRemote("potato", 30)
)
func TestMain(m *testing.M) {
if err != nil {
log.Fatal(err)
}
err = vm.Login()
if err != nil {
log.Fatal(err)
}
defer vm.Logout()
vm.Login()
code := m.Run()
vm.Logout()
os.Exit(code)
}
func sync() {
time.Sleep(30 * time.Millisecond)
for vm.Pdirty() || vm.Mdirty() {
}
m.Run()
}