mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-12-05 05:07:47 +00:00
strip, bus device
move stripdevice and busdevice back to strip & bus
This commit is contained in:
parent
820b897e84
commit
3f7bef56c1
22
lib/bus.ps1
22
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 {
|
||||
|
||||
@ -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'
|
||||
}
|
||||
}
|
||||
@ -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')
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user