diff --git a/CHANGELOG.md b/CHANGELOG.md index af469e3..ce051a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Before any minor/major patch is released all test units will be run to verify they pass. ## [Unreleased] -- [x] +- [x] Refactor Pester tests. +- [x] Add more strip/bus properties. +- [x] Ability to load custom profiles ## [2.2] - 2021-01-19 ### Added diff --git a/lib/bus.ps1 b/lib/bus.ps1 index 4e7b5ac..ee804c9 100644 --- a/lib/bus.ps1 +++ b/lib/bus.ps1 @@ -9,6 +9,7 @@ class Bus { $this.id = $id AddBoolMembers -PARAMS @('mono', 'mute') + AddStringMembers -PARAMS @('label') AddFloatMembers -PARAMS @('gain') } @@ -42,6 +43,23 @@ class Bus { class PhysicalBus : Bus { PhysicalBus ([Int]$id) : base ($id) { } + hidden $_device = $($this | Add-Member ScriptProperty 'device' ` + { + $this.Getter_String($this.cmd('device.name')) + }` + { + return Write-Warning("ERROR: " + $this.cmd('device.name') + " is read only") + } + ) + + hidden $_sr = $($this | Add-Member ScriptProperty 'sr' ` + { + $this.Getter($this.cmd('device.sr')) + }` + { + return Write-Warning("ERROR: " + $this.cmd('device.sr') + " is read only") + } + ) } class VirtualBus : Bus { diff --git a/lib/strip.ps1 b/lib/strip.ps1 index cc7df1d..2042dea 100644 --- a/lib/strip.ps1 +++ b/lib/strip.ps1 @@ -9,8 +9,8 @@ class Strip { $this.id = $id AddBoolMembers -PARAMS @('mono', 'solo', 'mute') - AddFloatMembers -PARAMS @('gain', 'comp', 'gate') AddIntMembers -PARAMS @('limit') + AddFloatMembers -PARAMS @('gain') AddStringMembers -PARAMS @('label') AddChannelMembers @@ -31,7 +31,13 @@ class Strip { [String] cmd ($arg) { return "Strip[" + $this.id + "].$arg" } +} +class PhysicalStrip : Strip { + PhysicalStrip ([Int]$id) : base ($id) { + AddFloatMembers -PARAMS @('comp', 'gate') + } + hidden $_device = $($this | Add-Member ScriptProperty 'device' ` { $this.Getter_String($this.cmd('device.name')) @@ -51,11 +57,6 @@ class Strip { ) } -class PhysicalStrip : Strip { - PhysicalStrip ([Int]$id) : base ($id) { - } -} - class VirtualStrip : Strip { VirtualStrip ([Int]$id) : base ($id) { }