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:
pblivingston
2025-12-03 04:18:25 -05:00
parent ab4baa5c44
commit 1d41be7396
5 changed files with 38 additions and 8 deletions

View File

@@ -640,6 +640,27 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
$vmr.recorder.prerectime = $value
$vmr.recorder.prerectime | Should -Be $value
}
It 'Should set and get Recorder.samplerate' -ForEach @(
@{ Value = 44100 }, @{ Value = 48000 }
) {
$vmr.recorder.samplerate = $value
$vmr.recorder.samplerate | Should -Be $value
}
It 'Should set and get Recorder.bitresolution' -ForEach @(
@{ Value = 24 }, @{ Value = 16 }
) {
$vmr.recorder.bitresolution = $value
$vmr.recorder.bitresolution | Should -Be $value
}
It 'Should set and get Recorder.kbps' -ForEach @(
@{ Value = 96 }, @{ Value = 192 }
) {
$vmr.recorder.kbps = $value
$vmr.recorder.kbps | Should -Be $value
}
}
}

View File

@@ -65,7 +65,12 @@ function main() {
# recording directory: default ~/My Documents/Voicemeeter, override if custom
$recDir = [System.IO.Path]::GetFullPath($recDir)
$ifCustomDir = Test-RecDir -vmr $vmr -recDir $recDir # avoid creating files we can't delete
if ($ifBasic) {
$ifCustomDir = $ifBasic # basic can't record, so skip the test
}
else {
$ifCustomDir = Test-RecDir -vmr $vmr -recDir $recDir # avoid creating files we can't delete
}
Invoke-Pester -Tag $tag -PassThru | Out-Null
}