mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-09 17:33:33 +00:00
storepreset, recallpreset
pester tests pass for all kinds manual tests pass for all kinds - show/hide - lock/unlock - showvbanchat/hidevbanchat
This commit is contained in:
@@ -908,6 +908,7 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
|
||||
$vmr.recorder.filetype = $filetype
|
||||
|
||||
$vmr.recorder.state = 'record'
|
||||
Start-Sleep -Milliseconds 100
|
||||
$stamp = '{0:yyyy-MM-dd} at {0:HH}h{0:mm}m{0:ss}s' -f (Get-Date)
|
||||
$vmr.recorder.state | Should -Be 'record'
|
||||
Start-Sleep -Milliseconds 2000
|
||||
@@ -1001,6 +1002,7 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
|
||||
|
||||
BeforeEach {
|
||||
$vmr.recorder.record()
|
||||
Start-Sleep -Milliseconds 100
|
||||
$stamp = '{0:yyyy-MM-dd} at {0:HH}h{0:mm}m{0:ss}s' -f (Get-Date)
|
||||
Start-Sleep -Milliseconds 2000
|
||||
|
||||
@@ -1043,5 +1045,64 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Context 'Command' {
|
||||
Context 'Preset Scene' -ForEach @(
|
||||
@{ Index = 0; Name = 'Test Scene 1' }
|
||||
@{ Index = 63; Name = 'Test Scene 64' }
|
||||
) {
|
||||
It "Should store preset at index '$index' with name '$name'" -ForEach @(
|
||||
@{ Value = -15.5 }, @{ Value = -52.9 }
|
||||
) {
|
||||
$vmr.bus[$phys_out].gain = $value
|
||||
$vmr.command.storepreset($index, $name)
|
||||
|
||||
$vmr.bus[$phys_out].gain = 0.0
|
||||
|
||||
$vmr.command.recallpreset($name)
|
||||
Start-Sleep -Milliseconds 500
|
||||
$vmr.bus[$phys_out].gain | Should -Be $value
|
||||
}
|
||||
|
||||
It "Should update preset at index '$index'" -ForEach @(
|
||||
@{ Value = $false }, @{ Value = $true }
|
||||
) {
|
||||
$vmr.strip[$virt_in].B1 = $value
|
||||
$vmr.command.storepreset($index)
|
||||
|
||||
$vmr.strip[$virt_in].B1 = -not $value
|
||||
|
||||
$vmr.command.recallpreset($index)
|
||||
Start-Sleep -Milliseconds 500
|
||||
$vmr.strip[$virt_in].B1 | Should -Be $value
|
||||
}
|
||||
|
||||
It "Should update preset with name '$name'" -ForEach @(
|
||||
@{ Value = 2 }, @{ Value = 1 }
|
||||
) {
|
||||
$vmr.bus[$virt_out].mono = $value
|
||||
$vmr.command.storepreset($name)
|
||||
|
||||
$vmr.bus[$virt_out].mono = 0
|
||||
|
||||
$vmr.command.recallpreset($name)
|
||||
Start-Sleep -Milliseconds 500
|
||||
$vmr.bus[$virt_out].mono | Should -Be $value
|
||||
}
|
||||
|
||||
It "Should update last recalled preset ($index`: $(($index + 1).ToString('00')) - $name)" -ForEach @(
|
||||
@{ Value = 0.8 }, @{ Value = 0.3 }
|
||||
) {
|
||||
$vmr.strip[$phys_in].color_y = $value
|
||||
$vmr.command.storepreset()
|
||||
|
||||
$vmr.strip[$phys_in].color_y = 0.0
|
||||
|
||||
$vmr.command.recallpreset()
|
||||
Start-Sleep -Milliseconds 500
|
||||
$vmr.strip[$phys_in].color_y | Should -Be $value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ function Test-RecDir ([object]$vmr, [string]$recDir) {
|
||||
|
||||
try {
|
||||
$vmr.recorder.record()
|
||||
Start-Sleep -Milliseconds 100
|
||||
$stamp = '{0:yyyy-MM-dd} at {0:HH}h{0:mm}m{0:ss}s' -f (Get-Date)
|
||||
Start-Sleep -Milliseconds 2000
|
||||
|
||||
|
||||
Reference in New Issue
Block a user