From e9bd950b3494dd671259c8ac1104467f7f564bfb Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 9 Feb 2019 19:18:19 +0100 Subject: mixer: implement mute/unmute and setting fader level --- cmd/dolmetschctld/dolmetschctld.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'cmd/dolmetschctld') diff --git a/cmd/dolmetschctld/dolmetschctld.go b/cmd/dolmetschctld/dolmetschctld.go index be9abd0..6cd74bb 100644 --- a/cmd/dolmetschctld/dolmetschctld.go +++ b/cmd/dolmetschctld/dolmetschctld.go @@ -25,6 +25,7 @@ package main import ( "log" "os" + "time" "spreadspace.org/dolmetschctl/pkg/mixer" ) @@ -39,6 +40,10 @@ func main() { } defer m.Shutdown() + log.Printf("successfully connected to mixer:") + log.Printf(" input: %s\t%s", m.DevIn.ID, m.DevIn.Name) + log.Printf(" output: %s\t%s", m.DevOut.ID, m.DevOut.Name) + if err = m.Init(); err != nil { log.Println("Error initializeing the mixer: %v", err) os.Exit(1) @@ -46,7 +51,12 @@ func main() { log.Printf("mixer successfully initialized!") - // TODO: do something + // TODO: implement state machine + m.UnMute(0x24) + m.SetLevel(0x24, 42) + time.Sleep(2 * time.Second) + m.Mute(0x24) + m.SetLevel(0x24, mixer.FaderLevel0db) log.Printf("exiting.") } -- cgit v1.2.3