summaryrefslogtreecommitdiff
path: root/cmd/dolmetschctld
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2019-02-09 19:18:19 +0100
committerChristian Pointner <equinox@spreadspace.org>2019-02-09 19:18:19 +0100
commite9bd950b3494dd671259c8ac1104467f7f564bfb (patch)
tree75ef5d0720cfec08817a6e217bc46d4b65fd7c53 /cmd/dolmetschctld
parentfix basic scaffolding (diff)
mixer: implement mute/unmute and setting fader level
Diffstat (limited to 'cmd/dolmetschctld')
-rw-r--r--cmd/dolmetschctld/dolmetschctld.go12
1 files changed, 11 insertions, 1 deletions
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.")
}