From 440c3b8eec706aa1e79ce5724e5de3be04f0ee27 Mon Sep 17 00:00:00 2001 From: norm Date: Mon, 19 Sep 2022 03:03:51 +0100 Subject: [PATCH 1/3] increae default delay to 20 --- examples/vm-cli/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/vm-cli/main.go b/examples/vm-cli/main.go index 2cb5ee7..d9101ba 100644 --- a/examples/vm-cli/main.go +++ b/examples/vm-cli/main.go @@ -11,7 +11,7 @@ import ( func main() { kindId := flag.String("kind", "banana", "kind of voicemeeter") - delay := flag.Int("delay", 15, "delay between commands") + delay := flag.Int("delay", 20, "delay between commands") flag.Parse() vm, err := vmConnect(kindId, delay) From ff56dd16f52fe95ca32df3f1c2c6f79630fa6ce4 Mon Sep 17 00:00:00 2001 From: norm Date: Mon, 19 Sep 2022 03:05:02 +0100 Subject: [PATCH 2/3] upd readme with new default delay --- examples/vm-cli/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/vm-cli/README.md b/examples/vm-cli/README.md index d576986..6f476ba 100644 --- a/examples/vm-cli/README.md +++ b/examples/vm-cli/README.md @@ -8,7 +8,7 @@ Toggle with `!` prefix, get by excluding `=` and set by including `=`. Mix and m You may pass an optional flag -kind to set the kind of Voicemeeter. Defaults to banana. -You may pass an optional flag -delay to set a delay on the getters. Defaults to 15ms. +You may pass an optional flag -delay to set a delay on the getters. Defaults to 20ms. for example: From 8a611e39aa4d0290962ffa5f70e7f78b82c57bac Mon Sep 17 00:00:00 2001 From: norm Date: Wed, 21 Sep 2022 07:30:14 +0100 Subject: [PATCH 3/3] change func and var names --- examples/vm-cli/main.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/vm-cli/main.go b/examples/vm-cli/main.go index d9101ba..a9c6de7 100644 --- a/examples/vm-cli/main.go +++ b/examples/vm-cli/main.go @@ -20,7 +20,7 @@ func main() { } defer vm.Logout() - err = run_commands(vm) + err = runCommands(vm) if err != nil { fmt.Println(err) } @@ -40,7 +40,7 @@ func vmConnect(kindId *string, delay *int) (*voicemeeter.Remote, error) { return vm, nil } -func run_commands(vm *voicemeeter.Remote) error { +func runCommands(vm *voicemeeter.Remote) error { for _, arg := range flag.Args() { if arg[0] == '!' { val, err := vm.GetFloat(arg[1:]) @@ -59,16 +59,16 @@ func run_commands(vm *voicemeeter.Remote) error { return err } } else { - val_f, err := vm.GetFloat(arg) + valF, err := vm.GetFloat(arg) if err != nil { - val_s, err := vm.GetString(arg) + valS, err := vm.GetString(arg) if err != nil { err = fmt.Errorf("unable to get %s", arg) return err } - fmt.Println("Value of", arg, "is:", val_s) + fmt.Println("Value of", arg, "is:", valS) } else { - fmt.Println("Value of", arg, "is:", val_f) + fmt.Println("Value of", arg, "is:", valF) } } }