mirror of
https://github.com/onyx-and-iris/voicemeeter.git
synced 2024-11-22 04:40:53 +00:00
outputs added to recorder. tests updated.
This commit is contained in:
parent
df83f9c15f
commit
8103e06d69
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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)
|
||||||
})
|
})
|
||||||
|
@ -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)
|
||||||
|
}
|
||||||
|
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user