mirror of
https://github.com/onyx-and-iris/xair-cli.git
synced 2026-02-04 07:27:47 +00:00
update addressMap for BusFader methods
This commit is contained in:
parent
102e276100
commit
9c8f14c86f
@ -343,7 +343,8 @@ func (c *Client) SetBusMute(bus int, muted bool) error {
|
|||||||
|
|
||||||
// BusFader requests the current fader level for a bus
|
// BusFader requests the current fader level for a bus
|
||||||
func (c *Client) BusFader(bus int) (float64, error) {
|
func (c *Client) BusFader(bus int) (float64, error) {
|
||||||
address := fmt.Sprintf("/bus/%01d/mix/fader", bus)
|
formatter := c.addressMap["bus"]
|
||||||
|
address := fmt.Sprintf(formatter, bus) + "/mix/fader"
|
||||||
err := c.SendMessage(address)
|
err := c.SendMessage(address)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return 0, err
|
return 0, err
|
||||||
@ -360,7 +361,8 @@ func (c *Client) BusFader(bus int) (float64, error) {
|
|||||||
|
|
||||||
// SetBusFader sets the fader level for a specific bus (1-based indexing)
|
// SetBusFader sets the fader level for a specific bus (1-based indexing)
|
||||||
func (c *Client) SetBusFader(bus int, level float64) error {
|
func (c *Client) SetBusFader(bus int, level float64) error {
|
||||||
address := fmt.Sprintf("/bus/%01d/mix/fader", bus)
|
formatter := c.addressMap["bus"]
|
||||||
|
address := fmt.Sprintf(formatter, bus) + "/mix/fader"
|
||||||
return c.SendMessage(address, float32(mustDbInto(level)))
|
return c.SendMessage(address, float32(mustDbInto(level)))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user