2022-06-23 14:05:49 +01:00
|
|
|
package voicemeeter
|
|
|
|
|
2022-07-10 23:08:14 +01:00
|
|
|
//command represents command (action) type parameters
|
2022-06-23 14:05:49 +01:00
|
|
|
type command struct {
|
2022-06-28 14:34:03 +01:00
|
|
|
iRemote
|
2022-06-23 14:05:49 +01:00
|
|
|
}
|
|
|
|
|
2022-07-10 23:08:14 +01:00
|
|
|
// newCommand returns a pointer to a command type
|
2022-06-23 14:05:49 +01:00
|
|
|
func newCommand() *command {
|
2022-06-28 14:34:03 +01:00
|
|
|
return &command{iRemote{"command", 0}}
|
2022-06-23 14:05:49 +01:00
|
|
|
}
|
|
|
|
|
2022-06-24 14:54:17 +01:00
|
|
|
// Show shows the Voicemeete GUI if it's hidden
|
2022-06-23 14:05:49 +01:00
|
|
|
func (c *command) Show() {
|
2022-06-28 14:34:03 +01:00
|
|
|
c.setter_float("Show", 1)
|
2022-06-23 14:05:49 +01:00
|
|
|
}
|
|
|
|
|
2022-06-24 14:54:17 +01:00
|
|
|
// Hide hides the Voicemeete GUI if it's shown
|
2022-06-23 14:05:49 +01:00
|
|
|
func (c *command) Hide() {
|
2022-06-28 14:34:03 +01:00
|
|
|
c.setter_float("Show", 0)
|
2022-06-23 14:05:49 +01:00
|
|
|
}
|
|
|
|
|
2022-06-24 14:54:17 +01:00
|
|
|
// Shutdown shutdown the Voicemeeter GUI
|
2022-06-23 14:05:49 +01:00
|
|
|
func (c *command) Shutdown() {
|
2022-06-28 14:34:03 +01:00
|
|
|
c.setter_float("Shutdown", 1)
|
2022-06-23 14:05:49 +01:00
|
|
|
}
|
|
|
|
|
2022-06-24 14:54:17 +01:00
|
|
|
// Restart restarts the Voicemeeter audio engine
|
2022-06-23 14:05:49 +01:00
|
|
|
func (c *command) Restart() {
|
2022-06-28 14:34:03 +01:00
|
|
|
c.setter_float("Restart", 1)
|
2022-06-23 14:05:49 +01:00
|
|
|
}
|
|
|
|
|
2022-06-24 14:54:17 +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
|
|
|
|
}
|
2022-06-28 14:34:03 +01:00
|
|
|
c.setter_float("Lock", value)
|
2022-06-23 14:05:49 +01:00
|
|
|
}
|