mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-09 17:33:33 +00:00
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:
10
lib/meta.ps1
10
lib/meta.ps1
@@ -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
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user