Get prefix removed from getters

True for Bus, Strip, Vban and Output types.

Bus[i].Eq() and Strip[i].Eq() now return pointers to eQ structs.
This makes it easier to extend Eq types in future if desired.

Strip[i].Comp()  now return pointer to comp struct
Strip[i].Gain() now return pointer to gain struct
This is to support the new API features in Potato 3.0.2.8

Removed casting in factory function return statements.
Since types are satisfied implicitly.

eQ struct type tests added
This commit is contained in:
2022-12-08 10:23:35 +00:00
parent 38973810d7
commit b116f04f51
6 changed files with 493 additions and 219 deletions

View File

@@ -2,21 +2,21 @@ package voicemeeter
// iOutputs defines the interface outputs type must satisfy
type iOutputs interface {
GetA1() bool
A1() bool
SetA1(val bool)
GetA2() bool
A2() bool
SetA2(val bool)
GetA3() bool
A3() bool
SetA3(val bool)
GetA4() bool
A4() bool
SetA4(val bool)
GetA5() bool
A5() bool
SetA5(val bool)
GetB1() bool
B1() bool
SetB1(val bool)
GetB2() bool
B2() bool
SetB2(val bool)
GetB3() bool
B3() bool
SetB3(val bool)
}
@@ -32,8 +32,8 @@ func newOutputs(id string, i int) outputs {
return o
}
// GetA1 returns the value of the A1 parameter
func (o *outputs) GetA1() bool {
// A1 returns the value of the A1 parameter
func (o *outputs) A1() bool {
return o.getter_bool("A1")
}
@@ -42,8 +42,8 @@ func (o *outputs) SetA1(val bool) {
o.setter_bool("A1", val)
}
// GetA2 returns the value of the A2 parameter
func (o *outputs) GetA2() bool {
// A2 returns the value of the A2 parameter
func (o *outputs) A2() bool {
return o.getter_bool("A2")
}
@@ -52,8 +52,8 @@ func (o *outputs) SetA2(val bool) {
o.setter_bool("A2", val)
}
// GetA3 returns the value of the A3 parameter
func (o *outputs) GetA3() bool {
// A3 returns the value of the A3 parameter
func (o *outputs) A3() bool {
return o.getter_bool("A3")
}
@@ -62,8 +62,8 @@ func (o *outputs) SetA3(val bool) {
o.setter_bool("A3", val)
}
// GetA4 returns the value of the A4 parameter
func (o *outputs) GetA4() bool {
// A4 returns the value of the A4 parameter
func (o *outputs) A4() bool {
return o.getter_bool("A4")
}
@@ -72,8 +72,8 @@ func (o *outputs) SetA4(val bool) {
o.setter_bool("A4", val)
}
// GetA5 returns the value of the A5 parameter
func (o *outputs) GetA5() bool {
// A5 returns the value of the A5 parameter
func (o *outputs) A5() bool {
return o.getter_bool("A5")
}
@@ -82,8 +82,8 @@ func (o *outputs) SetA5(val bool) {
o.setter_bool("A5", val)
}
// GetB1 returns the value of the B1 parameter
func (o *outputs) GetB1() bool {
// B1 returns the value of the B1 parameter
func (o *outputs) B1() bool {
return o.getter_bool("B1")
}
@@ -92,8 +92,8 @@ func (o *outputs) SetB1(val bool) {
o.setter_bool("B1", val)
}
// GetB2 returns the value of the B2 parameter
func (o *outputs) GetB2() bool {
// B2 returns the value of the B2 parameter
func (o *outputs) B2() bool {
return o.getter_bool("B2")
}
@@ -102,8 +102,8 @@ func (o *outputs) SetB2(val bool) {
o.setter_bool("B2", val)
}
// GetB3 returns the value of the B3 parameter
func (o *outputs) GetB3() bool {
// B3 returns the value of the B3 parameter
func (o *outputs) B3() bool {
return o.getter_bool("B3")
}