diff --git a/lib/bus.ps1 b/lib/bus.ps1 index 542b352..bd0ac15 100644 --- a/lib/bus.ps1 +++ b/lib/bus.ps1 @@ -111,6 +111,28 @@ class VirtualBus : Bus { } } +class BusDevice : Device { + BusDevice ([int]$index, [Object]$remote) : base ($index, $remote) { + if ($this.index -eq 0) { + $this.AddASIO() + } + } + + [string] identifier () { + return 'Bus[' + $this.index + '].Device' + } + + hidden [void] AddASIO () { + Add-Member -InputObject $this -MemberType ScriptProperty -Name 'asio' ` + -Value { + return Write-Warning ("ERROR: $($this.identifier()).asio is write only") + } -SecondValue { + param($arg) + return $this.Setter('asio', $arg) + } -Force + } +} + function Make_Buses ([Object]$remote) { [System.Collections.ArrayList]$bus = @() 0..$($remote.kind.p_out + $remote.kind.v_out - 1) | ForEach-Object { diff --git a/lib/device.ps1 b/lib/device.ps1 index aa24c8c..df8feb3 100644 --- a/lib/device.ps1 +++ b/lib/device.ps1 @@ -49,35 +49,4 @@ class Device : IRemote { return $this.Setter('mme', $arg) } ) -} - -class BusDevice : Device { - BusDevice ([int]$index, [Object]$remote) : base ($index, $remote) { - if ($this.index -eq 0) { - $this.AddASIO() - } - } - - [string] identifier () { - return 'Bus[' + $this.index + '].Device' - } - - hidden [void] AddASIO () { - Add-Member -InputObject $this -MemberType ScriptProperty -Name 'asio' ` - -Value { - return Write-Warning ("ERROR: $($this.identifier()).asio is write only") - } -SecondValue { - param($arg) - return $this.Setter('asio', $arg) - } -Force - } -} - -class StripDevice : Device { - StripDevice ([int]$index, [Object]$remote) : base ($index, $remote) { - } - - [string] identifier () { - return 'Strip[' + $this.index + '].Device' - } } \ No newline at end of file diff --git a/lib/strip.ps1 b/lib/strip.ps1 index 63b7dd3..ef16163 100644 --- a/lib/strip.ps1 +++ b/lib/strip.ps1 @@ -162,6 +162,15 @@ class StripEq : IRemote { } } +class StripDevice : Device { + StripDevice ([int]$index, [Object]$remote) : base ($index, $remote) { + } + + [string] identifier () { + return 'Strip[' + $this.index + '].Device' + } +} + class VirtualStrip : Strip { VirtualStrip ([int]$index, [Object]$remote) : base ($index, $remote) { AddBoolMembers -PARAMS @('mc')