voicemeeter-api-powershell/lib/recorder.ps1
onyx-and-iris 095a9362cb general updates, added fadeto/fadeby
fadeto, fadeby added to strip|bus

kind maps reworked.

bindings/profiles/kinds moved into their own files.

changelog/readme updated

version bump
2022-06-25 23:12:02 +01:00

48 lines
1.1 KiB
PowerShell

. $PSScriptRoot\meta.ps1
class Recorder {
[Object]$remote
# Constructor
Recorder([Object]$remote) {
$this.remote = $remote
AddActionMembers -PARAMS @('play', 'stop', 'pause', 'replay', 'record', 'ff', 'rew')
AddChannelMembers
}
[Single] Getter($cmd) {
return Param_Get -PARAM $cmd -IS_STRING $false
}
[void] Setter($param, $val) {
if ($val -is [Boolean]) {
Param_Set -PARAM $param -VALUE $(if ($val) { 1 } else { 0 })
}
else {
Param_Set -PARAM $param -VALUE $val
}
}
[String] cmd ($arg) {
return "Recorder.$arg"
}
hidden $_loop = $($this | Add-Member ScriptProperty 'loop' `
{
return Write-Warning("ERROR: " + $this.cmd('mode.loop') + " is write only")
}`
{
param( [bool]$arg )
$this._loop = $this.Setter($this.cmd('mode.loop'), $arg)
}
)
[void] Load([String]$filename) {
$this.Setter($this.cmd('load'), $filename)
}
}
Function Make_Recorder([Object]$remote) {
return [Recorder]::new($remote)
}