- eqgain float members added to virtual strips
- bass/low aliases for eqgain1
- mid/med aliases for eqgain2
- treble/high aliases for eqgain3

prelim pester tests for potato pass
This commit is contained in:
pblivingston 2025-12-07 11:50:48 -05:00
parent 4189ac7721
commit 0bdfb1c38f
4 changed files with 57 additions and 1 deletions

View File

@ -45,6 +45,7 @@ Recorder.FileType changed from method to write-only property
- Command.RecallPreset()
- AddAliasMembers meta function takes a hashtable `-MAP` of `alias = property`
- Strip.Karaoke alias for Strip.K
- Strip.EQGain1|EQGain2|EQGain3 with bass/low, mid/med, treble/high aliases, respectively
### Changed

View File

@ -140,6 +140,9 @@ The following strip commands are available:
- postfx1: bool
- postfx2: bool
- gainlayer0-gainlayer7: float
- eqgain1/bass/low: float, from -12.00 to 12.00
- eqgain2/mid/med: float, from -12.00 to 12.00
- eqgain3/treble/high: float, from -12.00 to 12.00
for example:

View File

@ -174,8 +174,18 @@ class VirtualStrip : Strip {
VirtualStrip ([int]$index, [Object]$remote) : base ($index, $remote) {
AddBoolMembers -PARAMS @('mc')
AddIntMembers -PARAMS @('k')
AddFloatMembers -PARAMS @('eqgain1', 'eqgain2', 'eqgain3')
AddAliasMembers -MAP @{ mono = 'mc'; karaoke = 'k' }
AddAliasMembers -MAP @{
mono = 'mc'
karaoke = 'k'
bass = 'eqgain1'
low = 'eqgain1'
mid = 'eqgain2'
med = 'eqgain2'
treble = 'eqgain3'
high = 'eqgain3'
}
}
[void] AppGain ([string]$appname, [single]$gain) {

View File

@ -342,6 +342,48 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
}
}
Context 'Strip, virtual only' -ForEach @(
@{ Index = $virt_in }
) {
Context 'EQ' {
BeforeEach {
$vmr.strip[$index].eqgain1 = 0
$vmr.strip[$index].eqgain2 = 0
$vmr.strip[$index].eqgain3 = 0
}
It "Should set Strip[$index].EQGain1 via alias 'bass'" {
$vmr.strip[$index].bass = $slide
$vmr.strip[$index].eqgain1 | Should -Be $slide
}
It "Should set Strip[$index].EQGain1 via alias 'low'" {
$vmr.strip[$index].low = $slide
$vmr.strip[$index].eqgain1 | Should -Be $slide
}
It "Should set Strip[$index].EQGain2 via alias 'mid'" {
$vmr.strip[$index].mid = $slide
$vmr.strip[$index].eqgain2 | Should -Be $slide
}
It "Should set Strip[$index].EQGain2 via alias 'med'" {
$vmr.strip[$index].med = $slide
$vmr.strip[$index].eqgain2 | Should -Be $slide
}
It "Should set Strip[$index].EQGain3 via alias 'treble'" {
$vmr.strip[$index].treble = $slide
$vmr.strip[$index].eqgain3 | Should -Be $slide
}
It "Should set Strip[$index].EQGain3 via alias 'high'" {
$vmr.strip[$index].high = $slide
$vmr.strip[$index].eqgain3 | Should -Be $slide
}
}
}
Context 'Bus, one physical one virtual' -ForEach @(
@{ Index = $phys_out }, @{ Index = $virt_out }
) {