strip, bus device

move stripdevice and busdevice back to strip & bus
This commit is contained in:
pblivingston 2025-11-27 06:09:55 -05:00
parent 820b897e84
commit 3f7bef56c1
3 changed files with 31 additions and 31 deletions

View File

@ -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) { function Make_Buses ([Object]$remote) {
[System.Collections.ArrayList]$bus = @() [System.Collections.ArrayList]$bus = @()
0..$($remote.kind.p_out + $remote.kind.v_out - 1) | ForEach-Object { 0..$($remote.kind.p_out + $remote.kind.v_out - 1) | ForEach-Object {

View File

@ -49,35 +49,4 @@ class Device : IRemote {
return $this.Setter('mme', $arg) 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'
}
} }

View File

@ -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 { class VirtualStrip : Strip {
VirtualStrip ([int]$index, [Object]$remote) : base ($index, $remote) { VirtualStrip ([int]$index, [Object]$remote) : base ($index, $remote) {
AddBoolMembers -PARAMS @('mc') AddBoolMembers -PARAMS @('mc')