From 4189ac7721531fa4912335410f75dbd134759692 Mon Sep 17 00:00:00 2001 From: pblivingston <71585805+pblivingston@users.noreply.github.com> Date: Sun, 7 Dec 2025 10:41:59 -0500 Subject: [PATCH] appgain, appmute - missing closing parenthesis in AppMute value string - AppGain, AppMute overloads for index prelim manual tests for potato pass --- CHANGELOG.md | 2 ++ README.md | 6 ++++-- lib/strip.ps1 | 10 +++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf902a0..e70cb40 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ Recorder.FileType changed from method to write-only property - Cast Recorder getters to types for consistency - Floats getters/setters now default to two decimal places. - Strip.Mono is now an alias for Strip.MC on virtual strips +- Strip.AppMute|AppGain can now take an app index; see README for details ### Fixed @@ -73,6 +74,7 @@ Recorder.FileType changed from method to write-only property - vban.stream.sr: $this._port -> $this._sr - Recorder.channel values: 1..8 -> (2, 4, 6, 8) - Strip.Limit type [int] -> [float] +- Missing closing parenthesis in AppMute value string ## [3.3.0] - 2024-06-29 diff --git a/README.md b/README.md index 55828fb..533b065 100644 --- a/README.md +++ b/README.md @@ -205,14 +205,16 @@ $vmr.strip[3].denoiser.knob = 5 #### AppGain | AppMute -- `AppGain(amount, gain)` : string, float -- `AppMute(amount, mutestate)` : string, bool +- AppGain($appname or $appindex, $gain) : string or int, float, from 0.00 to 1.00 +- AppMute($appname or $appindex, $mutestate) : string or int, bool for example: ```powershell $vmr.strip[5].AppGain("Spotify", 0.5) $vmr.strip[5].AppMute("Spotify", $true) +$vmr.strip[7].AppGain(0, 0.28) +$vmr.strip[6].AppMute(2, $false) ``` #### levels diff --git a/lib/strip.ps1 b/lib/strip.ps1 index e7368f1..c4b44c6 100644 --- a/lib/strip.ps1 +++ b/lib/strip.ps1 @@ -182,8 +182,16 @@ class VirtualStrip : Strip { $this.Setter('AppGain', "(`"$appname`", $gain)") } + [void] AppGain ([int]$appindex, [single]$gain) { + $this.Setter("App[$appindex].Gain", $gain) + } + [void] AppMute ([string]$appname, [bool]$mutestate) { - $this.Setter('AppMute', "(`"$appname`", $(if ($mutestate) { 1 } else { 0 })") + $this.Setter('AppMute', "(`"$appname`", $(if ($mutestate) { 1 } else { 0 }))") + } + + [void] AppMute ([int]$appindex, [bool]$mutestate) { + $this.Setter("App[$appindex].Mute", $mutestate) } }