outputs added to recorder. tests updated.

This commit is contained in:
onyx-and-iris 2022-07-01 01:35:54 +01:00
parent df83f9c15f
commit 8103e06d69
4 changed files with 13 additions and 8 deletions

View File

@ -1,7 +1,5 @@
package voicemeeter package voicemeeter
import "fmt"
type t_outputs interface { type t_outputs interface {
GetA1() bool GetA1() bool
SetA1(val bool) SetA1(val bool)
@ -25,8 +23,8 @@ type outputs struct {
iRemote iRemote
} }
func newOutputs(i int) outputs { func newOutputs(id string, i int) outputs {
o := outputs{iRemote{fmt.Sprintf("strip[%d]", i), i}} o := outputs{iRemote{id, i}}
return o return o
} }

View File

@ -8,7 +8,7 @@ import (
func TestGetOutputs(t *testing.T) { func TestGetOutputs(t *testing.T) {
//t.Skip("skipping test") //t.Skip("skipping test")
__o := newOutputs(0) __o := newOutputs("strip[0]", 0)
t.Run("Should return an output type", func(t *testing.T) { t.Run("Should return an output type", func(t *testing.T) {
assert.NotNil(t, __o) assert.NotNil(t, __o)
}) })

View File

@ -2,10 +2,12 @@ package voicemeeter
type recorder struct { type recorder struct {
iRemote iRemote
outputs
} }
func newRecorder() *recorder { 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 // Play plays the file currently loaded into the recorder
@ -42,3 +44,8 @@ func (r *recorder) Ff() {
func (r *recorder) Rew() { func (r *recorder) Rew() {
r.setter_float("Rew", 1) r.setter_float("Rew", 1)
} }
// Loop enables loop play mode
func (r *recorder) Loop(val bool) {
r.setter_bool("Mode.Loop", val)
}

View File

@ -114,7 +114,7 @@ type physicalStrip struct {
} }
func newPhysicalStrip(i int, k *kind) t_strip { func newPhysicalStrip(i int, k *kind) t_strip {
o := newOutputs(i) o := newOutputs(fmt.Sprintf("strip[%d]", i), i)
gl := make([]gainLayer, 8) gl := make([]gainLayer, 8)
for j := 0; j < 8; j++ { for j := 0; j < 8; j++ {
gl[j] = newGainLayer(i, j) gl[j] = newGainLayer(i, j)
@ -174,7 +174,7 @@ type virtualStrip struct {
} }
func newVirtualStrip(i int, k *kind) t_strip { func newVirtualStrip(i int, k *kind) t_strip {
o := newOutputs(i) o := newOutputs(fmt.Sprintf("strip[%d]", i), i)
gl := make([]gainLayer, 8) gl := make([]gainLayer, 8)
for j := 0; j < 8; j++ { for j := 0; j < 8; j++ {
gl[j] = newGainLayer(i, j) gl[j] = newGainLayer(i, j)