mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-12-05 05:07:47 +00:00
Merge pull request #25 from pblivingston/option-monitoringbus
Option.MonitoringBus
This commit is contained in:
commit
df2d1bb156
@ -491,6 +491,7 @@ The following Option commands are available:
|
|||||||
- asiosr: bool
|
- asiosr: bool
|
||||||
- monitorOnSel: bool
|
- monitorOnSel: bool
|
||||||
- sliderMode: bool
|
- sliderMode: bool
|
||||||
|
- monitoringBus: int, from 0 to bus index
|
||||||
|
|
||||||
The following Option.delay[i] methods are available:
|
The following Option.delay[i] methods are available:
|
||||||
|
|
||||||
|
|||||||
@ -24,7 +24,7 @@ class Option : IRemote {
|
|||||||
|
|
||||||
hidden $_sr = $($this | Add-Member ScriptProperty 'sr' `
|
hidden $_sr = $($this | Add-Member ScriptProperty 'sr' `
|
||||||
{
|
{
|
||||||
$this.Getter('sr')
|
[int]$this.Getter('sr')
|
||||||
} `
|
} `
|
||||||
{
|
{
|
||||||
param([int]$arg)
|
param([int]$arg)
|
||||||
@ -37,6 +37,28 @@ class Option : IRemote {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
hidden $_monitoringBus = $($this | Add-Member ScriptProperty 'monitoringBus' `
|
||||||
|
{
|
||||||
|
foreach ($bus in 0..$($this.remote.kind.p_out + $this.remote.kind.v_out - 1)) {
|
||||||
|
if ($this.remote.Getter("Bus[$bus].Monitor")) {
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return $bus
|
||||||
|
} `
|
||||||
|
{
|
||||||
|
param([int]$arg)
|
||||||
|
$busMax = $this.remote.kind.p_out + $this.remote.kind.v_out - 1
|
||||||
|
if ($arg -ge 0 -and $arg -le $busMax) {
|
||||||
|
$this._monitoringBus = $this.remote.Setter("Bus[$arg].Monitor", $arg)
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
Write-Warning ("Expected a bus index between 0 and $busMax")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class OptionBuffer : IRemote {
|
class OptionBuffer : IRemote {
|
||||||
@ -48,7 +70,7 @@ class OptionBuffer : IRemote {
|
|||||||
|
|
||||||
hidden $_mme = $($this | Add-Member ScriptProperty 'mme' `
|
hidden $_mme = $($this | Add-Member ScriptProperty 'mme' `
|
||||||
{
|
{
|
||||||
$this.Getter('mme')
|
[int]$this.Getter('mme')
|
||||||
} `
|
} `
|
||||||
{
|
{
|
||||||
param([int]$arg)
|
param([int]$arg)
|
||||||
@ -64,7 +86,7 @@ class OptionBuffer : IRemote {
|
|||||||
|
|
||||||
hidden $_wdm = $($this | Add-Member ScriptProperty 'wdm' `
|
hidden $_wdm = $($this | Add-Member ScriptProperty 'wdm' `
|
||||||
{
|
{
|
||||||
$this.Getter('wdm')
|
[int]$this.Getter('wdm')
|
||||||
} `
|
} `
|
||||||
{
|
{
|
||||||
param([int]$arg)
|
param([int]$arg)
|
||||||
@ -80,7 +102,7 @@ class OptionBuffer : IRemote {
|
|||||||
|
|
||||||
hidden $_ks = $($this | Add-Member ScriptProperty 'ks' `
|
hidden $_ks = $($this | Add-Member ScriptProperty 'ks' `
|
||||||
{
|
{
|
||||||
$this.Getter('ks')
|
[int]$this.Getter('ks')
|
||||||
} `
|
} `
|
||||||
{
|
{
|
||||||
param([int]$arg)
|
param([int]$arg)
|
||||||
@ -96,7 +118,7 @@ class OptionBuffer : IRemote {
|
|||||||
|
|
||||||
hidden $_asio = $($this | Add-Member ScriptProperty 'asio' `
|
hidden $_asio = $($this | Add-Member ScriptProperty 'asio' `
|
||||||
{
|
{
|
||||||
$this.Getter('asio')
|
[int]$this.Getter('asio')
|
||||||
} `
|
} `
|
||||||
{
|
{
|
||||||
param([int]$arg)
|
param([int]$arg)
|
||||||
|
|||||||
@ -574,6 +574,13 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
|
|||||||
$vmr.option.sr | Should -Be $value
|
$vmr.option.sr | Should -Be $value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
It 'Should set and get Option.MonitoringBus' -Skip:$ifNotPotato -ForEach @(
|
||||||
|
@{ Value = $phys_out }, @{ Value = $virt_out }
|
||||||
|
) {
|
||||||
|
$vmr.option.monitoringbus = $value
|
||||||
|
$vmr.option.monitoringbus | Should -Be $value
|
||||||
|
}
|
||||||
|
|
||||||
Context 'Option.buffer' -ForEach @(
|
Context 'Option.buffer' -ForEach @(
|
||||||
@{ Value = 1024 }, @{ Value = 512 }
|
@{ Value = 1024 }, @{ Value = 512 }
|
||||||
) {
|
) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user