mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-09 17:33:33 +00:00
channel, types
- correct channel values - add 'gain' to README - cast getters to [int] - add some int tests for safety - skip recording test if basic pester tests pass for all kinds manual tests for safety pass - channel
This commit is contained in:
@@ -71,7 +71,7 @@ class Recorder : IRemote {
|
||||
|
||||
hidden $_samplerate = $($this | Add-Member ScriptProperty 'samplerate' `
|
||||
{
|
||||
$this.Getter('samplerate')
|
||||
[int]$this.Getter('samplerate')
|
||||
} `
|
||||
{
|
||||
param([int]$arg)
|
||||
@@ -87,7 +87,7 @@ class Recorder : IRemote {
|
||||
|
||||
hidden $_bitresolution = $($this | Add-Member ScriptProperty 'bitresolution' `
|
||||
{
|
||||
$this.Getter('bitresolution')
|
||||
[int]$this.Getter('bitresolution')
|
||||
} `
|
||||
{
|
||||
param([int]$arg)
|
||||
@@ -103,22 +103,23 @@ class Recorder : IRemote {
|
||||
|
||||
hidden $_channel = $($this | Add-Member ScriptProperty 'channel' `
|
||||
{
|
||||
$this.Getter('channel')
|
||||
[int]$this.Getter('channel')
|
||||
} `
|
||||
{
|
||||
param([int]$arg)
|
||||
if ($arg -ge 1 -and $arg -le 8) {
|
||||
$opts = @(2, 4, 6, 8)
|
||||
if ($opts.Contains($arg)) {
|
||||
$this._channel = $this.Setter('channel', $arg)
|
||||
}
|
||||
else {
|
||||
"channel got: $arg, expected value from 1 to 8" | Write-Warning
|
||||
"channel got: $arg, expected one of $opts" | Write-Warning
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
hidden $_kbps = $($this | Add-Member ScriptProperty 'kbps' `
|
||||
{
|
||||
$this.Getter('kbps')
|
||||
[int]$this.Getter('kbps')
|
||||
} `
|
||||
{
|
||||
param([int]$arg)
|
||||
|
||||
Reference in New Issue
Block a user