summaryrefslogtreecommitdiff
path: root/pkg/mixer
diff options
context:
space:
mode:
authorChristian Pointner <equinox@spreadspace.org>2020-04-12 20:22:27 +0200
committerChristian Pointner <equinox@spreadspace.org>2020-04-12 20:22:27 +0200
commit89f471f9f129e2c9876091b4c229caac426db93d (patch)
tree8abc072693ffe564e496ad50889f59de00635b4b /pkg/mixer
parentnew mixer interface mostly done, remaining issues with floats and rounding er... (diff)
basic functionality works now
Diffstat (limited to 'pkg/mixer')
-rw-r--r--pkg/mixer/mixer.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/pkg/mixer/mixer.go b/pkg/mixer/mixer.go
index 58ae20b..dbc4dae 100644
--- a/pkg/mixer/mixer.go
+++ b/pkg/mixer/mixer.go
@@ -61,10 +61,11 @@ func (et EventType) String() string {
type FaderLevel float32
const (
- FaderLevelUnknown = FaderLevel(-1.0)
- FaderLevelMax = FaderLevel(1.00)
- FaderLevel0db = FaderLevel(0.75)
- FaderLevelOff = FaderLevel(0.00)
+ FaderLevelUnknown = FaderLevel(-1.0)
+ FaderLevelMax = FaderLevel(1.00)
+ FaderLevel0db = FaderLevel(0.75)
+ FaderLevelOff = FaderLevel(0.00)
+ FaderLevelIncrement = FaderLevel(0.01)
)
func (fl FaderLevel) String() string {
@@ -267,7 +268,11 @@ func (d oscDispatcher) Invoke(msg osc.Message, exactMatch bool) error {
if err != nil {
return err
}
- ev.Mute = Mute(arg)
+ if arg == 0 {
+ ev.Mute = MuteMuted
+ } else {
+ ev.Mute = MuteUnmuted
+ }
case "fader":
ev.Type = EventFaderChange
arg, err := msg.Arguments[0].ReadFloat32()