limit, alias members

- limit [int] -> [float]
- moved mono bool member to physicalstrip
- added AddAliasMembers meta function
- mono and karaoke aliases added to virtualstrip

prelim pester tests for potato pass
This commit is contained in:
pblivingston
2025-12-07 02:20:30 -05:00
parent 46584236d4
commit 6d511d8aa6
5 changed files with 53 additions and 17 deletions

View File

@@ -74,6 +74,16 @@ function AddActionMembers () {
}
}
function AddAliasMembers () {
param(
[hashtable]$MAP
)
foreach ($alias in $MAP.Keys) {
$this | Add-Member -MemberType AliasProperty -Name $alias `
-Value $MAP[$alias] -Force
}
}
function AddChannelMembers () {
$num_A = $this.remote.kind.p_out
$num_B = $this.remote.kind.v_out

View File

@@ -2,9 +2,8 @@ class Strip : IRemote {
[Object]$levels
Strip ([int]$index, [Object]$remote) : base ($index, $remote) {
AddBoolMembers -PARAMS @('mono', 'solo', 'mute')
AddIntMembers -PARAMS @('limit')
AddFloatMembers -PARAMS @('gain', 'pan_x', 'pan_y')
AddBoolMembers -PARAMS @('solo', 'mute')
AddFloatMembers -PARAMS @('gain', 'limit', 'pan_x', 'pan_y')
AddStringMembers -PARAMS @('label')
AddChannelMembers
@@ -83,6 +82,7 @@ class PhysicalStrip : Strip {
AddFloatMembers -PARAMS @('color_x', 'color_y', 'fx_x', 'fx_y')
AddFloatMembers -PARAMS @('reverb', 'delay', 'fx1', 'fx2')
AddBoolMembers -PARAMS @('postreverb', 'postdelay', 'postfx1', 'postfx2')
AddBoolMembers -PARAMS @('mono')
$this.comp = [StripComp]::new($index, $remote)
$this.gate = [StripGate]::new($index, $remote)
@@ -174,6 +174,8 @@ class VirtualStrip : Strip {
VirtualStrip ([int]$index, [Object]$remote) : base ($index, $remote) {
AddBoolMembers -PARAMS @('mc')
AddIntMembers -PARAMS @('k')
AddAliasMembers -MAP @{ mono = 'mc'; karaoke = 'k' }
}
[void] AppGain ([string]$appname, [single]$gain) {