mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-09 17:33:33 +00:00
prefix, filetype
changed to write-only properties pester tests pass for all kinds
This commit is contained in:
@@ -41,22 +41,6 @@ class Recorder : IRemote {
|
||||
$this.Setter('load', $filename)
|
||||
}
|
||||
|
||||
[void] Prefix ([string]$prefix) {
|
||||
$this.Setter('prefix', $prefix)
|
||||
}
|
||||
|
||||
[void] FileType([string]$format) {
|
||||
[int]$val = 0
|
||||
switch ($format) {
|
||||
'wav' { $val = 1 }
|
||||
'aiff' { $val = 2 }
|
||||
'bwf' { $val = 3 }
|
||||
'mp3' { $val = 100 }
|
||||
default { "Filetype() got: $format, expected one of 'wav', 'aiff', 'bwf', 'mp3'" }
|
||||
}
|
||||
$this.Setter('filetype', $val)
|
||||
}
|
||||
|
||||
[void] GoTo ([string]$timestring) {
|
||||
try {
|
||||
if ([datetime]::ParseExact($timestring, 'HH:mm:ss', $null)) {
|
||||
@@ -133,6 +117,34 @@ class Recorder : IRemote {
|
||||
}
|
||||
)
|
||||
|
||||
hidden $_prefix = $($this | Add-Member ScriptProperty 'prefix' `
|
||||
{
|
||||
return Write-Warning ("ERROR: $($this.identifier()).prefix is write only")
|
||||
} `
|
||||
{
|
||||
param([string]$arg)
|
||||
$this._prefix = $this.Setter('prefix', $arg)
|
||||
}
|
||||
)
|
||||
|
||||
hidden $_filetype = $($this | Add-Member ScriptProperty 'filetype' `
|
||||
{
|
||||
return Write-Warning ("ERROR: $($this.identifier()).filetype is write only")
|
||||
} `
|
||||
{
|
||||
param([string]$arg)
|
||||
[int]$val = 0
|
||||
switch ($arg) {
|
||||
'wav' { $val = 1 }
|
||||
'aiff' { $val = 2 }
|
||||
'bwf' { $val = 3 }
|
||||
'mp3' { $val = 100 }
|
||||
default { "Filetype() got: $arg, expected one of 'wav', 'aiff', 'bwf', 'mp3'" }
|
||||
}
|
||||
$this._filetype = $this.Setter('filetype', $val)
|
||||
}
|
||||
)
|
||||
|
||||
hidden $_armedbus = $($this | Add-Member ScriptProperty 'armedbus' `
|
||||
{
|
||||
foreach ($bus in 0..$($this.remote.kind.p_out + $this.remote.kind.v_out - 1)) {
|
||||
|
||||
Reference in New Issue
Block a user