mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-18 13:33:31 +00:00
xy and fx parameters added to strip/bus classes.
GetType, GetVersion, SendText added to Remote class. Console output now written to Debug stream. ToString() method overriden for higher classes. formatter run through all files.
This commit is contained in:
@@ -3,45 +3,49 @@
|
||||
class Recorder {
|
||||
[Object]$remote
|
||||
# Constructor
|
||||
Recorder([Object]$remote) {
|
||||
Recorder ([Object]$remote) {
|
||||
$this.remote = $remote
|
||||
|
||||
|
||||
AddActionMembers -PARAMS @('play', 'stop', 'pause', 'replay', 'record', 'ff', 'rew')
|
||||
AddChannelMembers
|
||||
}
|
||||
|
||||
[Single] Getter($cmd) {
|
||||
[string] ToString() {
|
||||
return $this.GetType().Name
|
||||
}
|
||||
|
||||
[single] Getter ($cmd) {
|
||||
return Param_Get -PARAM $cmd -IS_STRING $false
|
||||
}
|
||||
|
||||
[void] Setter($param, $val) {
|
||||
[void] Setter ($param, $val) {
|
||||
if ($val -is [Boolean]) {
|
||||
Param_Set -PARAM $param -VALUE $(if ($val) { 1 } else { 0 })
|
||||
Param_Set -PARAM $param -Value $(if ($val) { 1 } else { 0 })
|
||||
}
|
||||
else {
|
||||
Param_Set -PARAM $param -VALUE $val
|
||||
Param_Set -PARAM $param -Value $val
|
||||
}
|
||||
}
|
||||
|
||||
[String] cmd ($arg) {
|
||||
[string] cmd ($arg) {
|
||||
return "Recorder.$arg"
|
||||
}
|
||||
|
||||
hidden $_loop = $($this | Add-Member ScriptProperty 'loop' `
|
||||
{
|
||||
return Write-Warning("ERROR: " + $this.cmd('mode.loop') + " is write only")
|
||||
}`
|
||||
return Write-Warning ("ERROR: " + $this.cmd('mode.loop') + " is write only")
|
||||
} `
|
||||
{
|
||||
param( [bool]$arg )
|
||||
param([bool]$arg)
|
||||
$this._loop = $this.Setter($this.cmd('mode.loop'), $arg)
|
||||
}
|
||||
)
|
||||
|
||||
[void] Load([String]$filename) {
|
||||
[void] Load ([string]$filename) {
|
||||
$this.Setter($this.cmd('load'), $filename)
|
||||
}
|
||||
}
|
||||
|
||||
Function Make_Recorder([Object]$remote) {
|
||||
function Make_Recorder ([Object]$remote) {
|
||||
return [Recorder]::new($remote)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user