mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-01-02 16:57:46 +00:00
Compare commits
No commits in common. "b20f62f17c8dbc58e0cdbc485d0fd5f24fa349de" and "16dd73231e126e909dd89cc7707cf06ca6f1c363" have entirely different histories.
b20f62f17c
...
16dd73231e
@ -14,7 +14,6 @@ Before any major/minor/patch is released all test units will be run to verify th
|
|||||||
- IRemote base class
|
- IRemote base class
|
||||||
- ArrayMember classes for array-like properties
|
- ArrayMember classes for array-like properties
|
||||||
- Patch class
|
- Patch class
|
||||||
- Option class
|
|
||||||
|
|
||||||
## [3.3.0] - 2024-06-29
|
## [3.3.0] - 2024-06-29
|
||||||
|
|
||||||
|
|||||||
37
README.md
37
README.md
@ -440,43 +440,6 @@ $vmr.patch.composite[5].set(0) # sets composite channel 6 (5) to default bus c
|
|||||||
$vmr.patch.insert[4].get()
|
$vmr.patch.insert[4].get()
|
||||||
```
|
```
|
||||||
|
|
||||||
### Option
|
|
||||||
|
|
||||||
The following Option commands are available:
|
|
||||||
|
|
||||||
- sr: int, (32000, 44100, 48000, 88200, 96000, 176400, 192000)
|
|
||||||
- asiosr: bool
|
|
||||||
- monitorOnSel: bool
|
|
||||||
- sliderMode: bool
|
|
||||||
|
|
||||||
The following Option.delay[i] methods are available:
|
|
||||||
|
|
||||||
- Set($val): float, from 0.00 to 500.00
|
|
||||||
- Get()
|
|
||||||
|
|
||||||
for example:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
$vmr.Option.delay[2].set(30.26) # sets the delay for the third (2) bus
|
|
||||||
$vmr.Option.sliderMode = $false # sets slider mode to absolute
|
|
||||||
```
|
|
||||||
|
|
||||||
#### buffers
|
|
||||||
|
|
||||||
The following Option.buffer commands are available:
|
|
||||||
|
|
||||||
- mme: int, (441, 480, 512, 576, 640, 704, 768, 896, 1024, 1536, 2048)
|
|
||||||
- wdm: int, (128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 441, 448, 480, 512, 576, 640, 704, 768, 1024, 1536, 2048)
|
|
||||||
- ks: int, (128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 441, 448, 480, 512, 576, 640, 704, 768, 1024, 1536, 2048)
|
|
||||||
- asio: int, (0, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 441, 448, 480, 512, 576, 640, 704, 768, 1024)
|
|
||||||
|
|
||||||
for example:
|
|
||||||
|
|
||||||
```powershell
|
|
||||||
$vmr.Option.buffer.wdm = 512
|
|
||||||
$vmr.Option.buffer.asio = 0 # to use default buffer size
|
|
||||||
```
|
|
||||||
|
|
||||||
### Recorder
|
### Recorder
|
||||||
|
|
||||||
The following commands are available:
|
The following commands are available:
|
||||||
|
|||||||
@ -11,7 +11,6 @@
|
|||||||
. $PSScriptRoot\command.ps1
|
. $PSScriptRoot\command.ps1
|
||||||
. $PSScriptRoot\recorder.ps1
|
. $PSScriptRoot\recorder.ps1
|
||||||
. $PSScriptRoot\patch.ps1
|
. $PSScriptRoot\patch.ps1
|
||||||
. $PSScriptRoot\option.ps1
|
|
||||||
. $PSScriptRoot\profiles.ps1
|
. $PSScriptRoot\profiles.ps1
|
||||||
|
|
||||||
class Remote {
|
class Remote {
|
||||||
@ -82,7 +81,6 @@ class RemoteBasic : Remote {
|
|||||||
[PSCustomObject]$vban
|
[PSCustomObject]$vban
|
||||||
[Object]$command
|
[Object]$command
|
||||||
[Object]$patch
|
[Object]$patch
|
||||||
[Object]$option
|
|
||||||
|
|
||||||
RemoteBasic () : base ('basic') {
|
RemoteBasic () : base ('basic') {
|
||||||
$this.strip = Make_Strips($this)
|
$this.strip = Make_Strips($this)
|
||||||
@ -91,7 +89,6 @@ class RemoteBasic : Remote {
|
|||||||
$this.vban = Make_Vban($this)
|
$this.vban = Make_Vban($this)
|
||||||
$this.command = Make_Command($this)
|
$this.command = Make_Command($this)
|
||||||
$this.patch = Make_Patch($this)
|
$this.patch = Make_Patch($this)
|
||||||
$this.option = Make_Option($this)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -102,7 +99,6 @@ class RemoteBanana : Remote {
|
|||||||
[PSCustomObject]$vban
|
[PSCustomObject]$vban
|
||||||
[Object]$command
|
[Object]$command
|
||||||
[Object]$patch
|
[Object]$patch
|
||||||
[Object]$option
|
|
||||||
[Object]$recorder
|
[Object]$recorder
|
||||||
|
|
||||||
RemoteBanana () : base ('banana') {
|
RemoteBanana () : base ('banana') {
|
||||||
@ -112,7 +108,6 @@ class RemoteBanana : Remote {
|
|||||||
$this.vban = Make_Vban($this)
|
$this.vban = Make_Vban($this)
|
||||||
$this.command = Make_Command($this)
|
$this.command = Make_Command($this)
|
||||||
$this.patch = Make_Patch($this)
|
$this.patch = Make_Patch($this)
|
||||||
$this.option = Make_Option($this)
|
|
||||||
$this.recorder = Make_Recorder($this)
|
$this.recorder = Make_Recorder($this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -124,7 +119,6 @@ class RemotePotato : Remote {
|
|||||||
[PSCustomObject]$vban
|
[PSCustomObject]$vban
|
||||||
[Object]$command
|
[Object]$command
|
||||||
[Object]$patch
|
[Object]$patch
|
||||||
[Object]$option
|
|
||||||
[Object]$recorder
|
[Object]$recorder
|
||||||
|
|
||||||
RemotePotato () : base ('potato') {
|
RemotePotato () : base ('potato') {
|
||||||
@ -134,7 +128,6 @@ class RemotePotato : Remote {
|
|||||||
$this.vban = Make_Vban($this)
|
$this.vban = Make_Vban($this)
|
||||||
$this.command = Make_Command($this)
|
$this.command = Make_Command($this)
|
||||||
$this.patch = Make_Patch($this)
|
$this.patch = Make_Patch($this)
|
||||||
$this.option = Make_Option($this)
|
|
||||||
$this.recorder = Make_Recorder($this)
|
$this.recorder = Make_Recorder($this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
116
lib/option.ps1
116
lib/option.ps1
@ -1,116 +0,0 @@
|
|||||||
class Option : IRemote {
|
|
||||||
[System.Collections.ArrayList]$delay
|
|
||||||
[Object]$buffer
|
|
||||||
|
|
||||||
Option ([Object]$remote) : base ($remote) {
|
|
||||||
AddBoolMembers -PARAMS @('asiosr', 'monitorOnSel', 'sliderMode')
|
|
||||||
|
|
||||||
$this.buffer = [OptionBuffer]::new($remote)
|
|
||||||
|
|
||||||
$num_A = $this.remote.kind.p_out
|
|
||||||
if ($this.remote.kind.name -eq 'basic') {
|
|
||||||
$num_A += $this.remote.kind.v_out
|
|
||||||
}
|
|
||||||
|
|
||||||
$this.delay = @()
|
|
||||||
for ($i = 0; $i -lt $num_A; $i++) {
|
|
||||||
$this.delay.Add([FloatArrayMember]::new($i, 'delay', $this, 2))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
[string] identifier () {
|
|
||||||
return 'Option'
|
|
||||||
}
|
|
||||||
|
|
||||||
hidden $_sr = $($this | Add-Member ScriptProperty 'sr' `
|
|
||||||
{
|
|
||||||
$this.Getter('sr')
|
|
||||||
} `
|
|
||||||
{
|
|
||||||
param([int]$arg)
|
|
||||||
$opts = @(32000, 44100, 48000, 88200, 96000, 176400, 192000)
|
|
||||||
if ($opts.Contains($arg)) {
|
|
||||||
$this._sr = $this.Setter('sr', $arg)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Warning ('Expected one of', $opts)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
class OptionBuffer : IRemote {
|
|
||||||
OptionBuffer ([Object]$remote) : base ($remote) {}
|
|
||||||
|
|
||||||
[string] identifier () {
|
|
||||||
return 'Option.Buffer'
|
|
||||||
}
|
|
||||||
|
|
||||||
hidden $_mme = $($this | Add-Member ScriptProperty 'mme' `
|
|
||||||
{
|
|
||||||
$this.Getter('mme')
|
|
||||||
} `
|
|
||||||
{
|
|
||||||
param([int]$arg)
|
|
||||||
$opts = @(441, 480, 512, 576, 640, 704, 768, 896, 1024, 1536, 2048)
|
|
||||||
if ($opts.Contains($arg)) {
|
|
||||||
$this._mme = $this.Setter('mme', $arg)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Warning ('Expected one of', $opts)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
hidden $_wdm = $($this | Add-Member ScriptProperty 'wdm' `
|
|
||||||
{
|
|
||||||
$this.Getter('wdm')
|
|
||||||
} `
|
|
||||||
{
|
|
||||||
param([int]$arg)
|
|
||||||
$opts = @(128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 441, 448, 480, 512, 576, 640, 704, 768, 1024, 1536, 2048)
|
|
||||||
if ($opts.Contains($arg)) {
|
|
||||||
$this._wdm = $this.Setter('wdm', $arg)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Warning ('Expected one of', $opts)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
hidden $_ks = $($this | Add-Member ScriptProperty 'ks' `
|
|
||||||
{
|
|
||||||
$this.Getter('ks')
|
|
||||||
} `
|
|
||||||
{
|
|
||||||
param([int]$arg)
|
|
||||||
$opts = @(128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 441, 448, 480, 512, 576, 640, 704, 768, 1024, 1536, 2048)
|
|
||||||
if ($opts.Contains($arg)) {
|
|
||||||
$this._ks = $this.Setter('ks', $arg)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Warning ('Expected one of', $opts)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
|
|
||||||
hidden $_asio = $($this | Add-Member ScriptProperty 'asio' `
|
|
||||||
{
|
|
||||||
$this.Getter('asio')
|
|
||||||
} `
|
|
||||||
{
|
|
||||||
param([int]$arg)
|
|
||||||
$opts = @(0, 64, 96, 128, 160, 192, 224, 256, 288, 320, 352, 384, 416, 441, 448, 480, 512, 576, 640, 704, 768, 1024)
|
|
||||||
if ($opts.Contains($arg)) {
|
|
||||||
$this._asio = $this.Setter('asio', $arg)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
Write-Warning ('Expected one of', $opts)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
function Make_Option ([Object]$remote) {
|
|
||||||
return [Option]::new($remote)
|
|
||||||
}
|
|
||||||
@ -127,22 +127,6 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
|
|||||||
$vmr.patch.postfxinsert | Should -Be $value
|
$vmr.patch.postfxinsert | Should -Be $value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Context 'Option' {
|
|
||||||
It 'Should set and get Option.monitoronsel' -Skip:$ifNotPotato {
|
|
||||||
$vmr.option.monitoronsel = $value
|
|
||||||
$vmr.command.restart
|
|
||||||
Start-Sleep -Milliseconds 500
|
|
||||||
$vmr.option.monitoronsel | Should -Be $value
|
|
||||||
}
|
|
||||||
|
|
||||||
It 'Should set and get Option.slidermode' -Skip:$ifNotPotato {
|
|
||||||
$vmr.option.slidermode = $value
|
|
||||||
$vmr.command.restart
|
|
||||||
Start-Sleep -Milliseconds 500
|
|
||||||
$vmr.option.slidermode | Should -Be $value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe 'Float Tests' {
|
Describe 'Float Tests' {
|
||||||
@ -238,17 +222,6 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Context 'Option' {
|
|
||||||
It "Should set and get Option.delay[$phys_out]" -ForEach @(
|
|
||||||
@{ Value = 486.57 }, @{ Value = 26.41 }
|
|
||||||
) {
|
|
||||||
$vmr.option.delay[$phys_out].set($value)
|
|
||||||
$vmr.command.restart
|
|
||||||
Start-Sleep -Milliseconds 500
|
|
||||||
$vmr.option.delay[$phys_out].get() | Should -Be $value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe 'Int Tests' -ForEach @(
|
Describe 'Int Tests' -ForEach @(
|
||||||
@ -294,38 +267,6 @@ Describe -Tag 'higher', -TestName 'All Higher Tests' {
|
|||||||
$vmr.patch.composite[$composite].get() | Should -Be $value
|
$vmr.patch.composite[$composite].get() | Should -Be $value
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Context 'Option' {
|
|
||||||
It 'Should set and get Option.sr' -ForEach @(
|
|
||||||
@{ Value = 44100 }, @{ Value = 48000 }
|
|
||||||
) {
|
|
||||||
$vmr.option.sr = $value
|
|
||||||
Start-Sleep -Milliseconds 500
|
|
||||||
$vmr.option.sr | Should -Be $value
|
|
||||||
}
|
|
||||||
|
|
||||||
Context 'Option.buffer' -ForEach @(
|
|
||||||
@{ Value = 1024 }, @{ Value = 512 }
|
|
||||||
) {
|
|
||||||
It 'Should set and get mme buffer' {
|
|
||||||
$vmr.option.buffer.mme = $value
|
|
||||||
Start-Sleep -Milliseconds 500
|
|
||||||
$vmr.option.buffer.mme | Should -Be $value
|
|
||||||
}
|
|
||||||
|
|
||||||
It 'Should set and get wdm buffer' {
|
|
||||||
$vmr.option.buffer.wdm = $value
|
|
||||||
Start-Sleep -Milliseconds 500
|
|
||||||
$vmr.option.buffer.wdm | Should -Be $value
|
|
||||||
}
|
|
||||||
|
|
||||||
It 'Should set and get ks buffer' {
|
|
||||||
$vmr.option.buffer.ks = $value
|
|
||||||
Start-Sleep -Milliseconds 500
|
|
||||||
$vmr.option.buffer.ks | Should -Be $value
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Describe 'String Tests' {
|
Describe 'String Tests' {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user