mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-18 05:23:32 +00:00
update to strip, bus
Add classes PhysicalStrip, VirtualStrip that now subclass Strip. Add classes PhysicalBus, VirtualBus that now subclass Bus. SetChannelLayout now a hidden function. $bool_params now type System.Collection.ArrayList Added device and sr properties
This commit is contained in:
15
lib/bus.ps1
15
lib/bus.ps1
@@ -37,10 +37,21 @@ class Bus {
|
||||
)
|
||||
}
|
||||
|
||||
class PhysicalBus : Bus {
|
||||
PhysicalBus ([Int]$id) : base ($id) {
|
||||
}
|
||||
}
|
||||
|
||||
class VirtualBus : Bus {
|
||||
VirtualBus ([Int]$id) : base ($id) {
|
||||
}
|
||||
}
|
||||
|
||||
Function Buses {
|
||||
[System.Collections.ArrayList]$bus = @()
|
||||
0..$($layout.Bus-1) | ForEach-Object {
|
||||
[void]$bus.Add([Bus]::new($_))
|
||||
0..$($layout.p_out + $layout.v_out -1) | ForEach-Object {
|
||||
if ($_ -lt $layout.p_out) { [void]$bus.Add([PhysicalBus]::new($_)) }
|
||||
else { [void]$bus.Add([VirtualBus]::new($_)) }
|
||||
}
|
||||
$bus
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user