voicemeeter/command.go

43 lines
837 B
Go
Raw Normal View History

2022-06-23 14:05:49 +01:00
package voicemeeter
//command represents command (action) type parameters
2022-06-23 14:05:49 +01:00
type command struct {
iRemote
2022-06-23 14:05:49 +01:00
}
// newCommand returns a pointer to a command type
2022-06-23 14:05:49 +01:00
func newCommand() *command {
return &command{iRemote{"command", 0}}
2022-06-23 14:05:49 +01:00
}
// Show shows the Voicemeete GUI if it's hidden
2022-06-23 14:05:49 +01:00
func (c *command) Show() {
c.setter_float("Show", 1)
2022-06-23 14:05:49 +01:00
}
// Hide hides the Voicemeete GUI if it's shown
2022-06-23 14:05:49 +01:00
func (c *command) Hide() {
c.setter_float("Show", 0)
2022-06-23 14:05:49 +01:00
}
// Shutdown shutdown the Voicemeeter GUI
2022-06-23 14:05:49 +01:00
func (c *command) Shutdown() {
c.setter_float("Shutdown", 1)
2022-06-23 14:05:49 +01:00
}
// Restart restarts the Voicemeeter audio engine
2022-06-23 14:05:49 +01:00
func (c *command) Restart() {
c.setter_float("Restart", 1)
2022-06-23 14:05:49 +01:00
}
// Lock locks or unlocks the Voiceemeter GUI
2022-06-23 14:05:49 +01:00
func (c *command) Lock(val bool) {
var value float32
if val {
value = 1
} else {
value = 0
}
c.setter_float("Lock", value)
2022-06-23 14:05:49 +01:00
}