diff --git a/voicemeeter/outputs.go b/voicemeeter/outputs.go index b6069bf..c8fded0 100644 --- a/voicemeeter/outputs.go +++ b/voicemeeter/outputs.go @@ -1,7 +1,5 @@ package voicemeeter -import "fmt" - type t_outputs interface { GetA1() bool SetA1(val bool) @@ -25,8 +23,8 @@ type outputs struct { iRemote } -func newOutputs(i int) outputs { - o := outputs{iRemote{fmt.Sprintf("strip[%d]", i), i}} +func newOutputs(id string, i int) outputs { + o := outputs{iRemote{id, i}} return o } diff --git a/voicemeeter/outputs_test.go b/voicemeeter/outputs_test.go index 4432bf9..24d450a 100644 --- a/voicemeeter/outputs_test.go +++ b/voicemeeter/outputs_test.go @@ -8,7 +8,7 @@ import ( func TestGetOutputs(t *testing.T) { //t.Skip("skipping test") - __o := newOutputs(0) + __o := newOutputs("strip[0]", 0) t.Run("Should return an output type", func(t *testing.T) { assert.NotNil(t, __o) }) diff --git a/voicemeeter/recorder.go b/voicemeeter/recorder.go index eddb68e..804e647 100644 --- a/voicemeeter/recorder.go +++ b/voicemeeter/recorder.go @@ -2,10 +2,12 @@ package voicemeeter type recorder struct { iRemote + outputs } func newRecorder() *recorder { - return &recorder{iRemote{"recorder", 0}} + o := newOutputs("recorder", 0) + return &recorder{iRemote{"recorder", 0}, o} } // Play plays the file currently loaded into the recorder @@ -42,3 +44,8 @@ func (r *recorder) Ff() { func (r *recorder) Rew() { r.setter_float("Rew", 1) } + +// Loop enables loop play mode +func (r *recorder) Loop(val bool) { + r.setter_bool("Mode.Loop", val) +} diff --git a/voicemeeter/strip.go b/voicemeeter/strip.go index 3fdb309..ad90c4a 100644 --- a/voicemeeter/strip.go +++ b/voicemeeter/strip.go @@ -114,7 +114,7 @@ type physicalStrip struct { } func newPhysicalStrip(i int, k *kind) t_strip { - o := newOutputs(i) + o := newOutputs(fmt.Sprintf("strip[%d]", i), i) gl := make([]gainLayer, 8) for j := 0; j < 8; j++ { gl[j] = newGainLayer(i, j) @@ -174,7 +174,7 @@ type virtualStrip struct { } func newVirtualStrip(i int, k *kind) t_strip { - o := newOutputs(i) + o := newOutputs(fmt.Sprintf("strip[%d]", i), i) gl := make([]gainLayer, 8) for j := 0; j < 8; j++ { gl[j] = newGainLayer(i, j)