mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-01-31 02:20:48 +00:00
upd rew.
add quick.ps1 to gitignore run formatter on files
This commit is contained in:
parent
4417075330
commit
8429fed8b4
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,5 @@
|
|||||||
|
# quick test
|
||||||
|
quick.ps1
|
||||||
|
|
||||||
lib/*.psd1
|
lib/*.psd1
|
||||||
**/*.log
|
**/*.log
|
||||||
|
@ -203,7 +203,7 @@ The following methods are available:
|
|||||||
- pause
|
- pause
|
||||||
- record
|
- record
|
||||||
- ff
|
- ff
|
||||||
- rw
|
- rew
|
||||||
|
|
||||||
The following properties accept boolean values.
|
The following properties accept boolean values.
|
||||||
|
|
||||||
|
@ -11,8 +11,7 @@ class Remote {
|
|||||||
[Object]$profiles
|
[Object]$profiles
|
||||||
|
|
||||||
# Constructor
|
# Constructor
|
||||||
Remote ([String]$kind)
|
Remote ([String]$kind) {
|
||||||
{
|
|
||||||
$this.kind = $kind
|
$this.kind = $kind
|
||||||
$this.Setup()
|
$this.Setup()
|
||||||
}
|
}
|
||||||
|
12
lib/base.ps1
12
lib/base.ps1
@ -213,7 +213,8 @@ Function Get_Profiles {
|
|||||||
$basepath = Join-Path -Path $(Split-Path -Path $PSScriptRoot) -ChildPath "profiles"
|
$basepath = Join-Path -Path $(Split-Path -Path $PSScriptRoot) -ChildPath "profiles"
|
||||||
if (Test-Path $basepath) {
|
if (Test-Path $basepath) {
|
||||||
$fullpath = Join-Path -Path $basepath -ChildPath $layout.name
|
$fullpath = Join-Path -Path $basepath -ChildPath $layout.name
|
||||||
} else {return $null}
|
}
|
||||||
|
else { return $null }
|
||||||
$filenames = @(Get-ChildItem -Path $fullpath -Filter *.psd1 -Recurse -File)
|
$filenames = @(Get-ChildItem -Path $fullpath -Filter *.psd1 -Recurse -File)
|
||||||
|
|
||||||
if ($filenames) {
|
if ($filenames) {
|
||||||
@ -267,7 +268,8 @@ Function Login {
|
|||||||
'potato' {
|
'potato' {
|
||||||
if ([Environment]::Is64BitOperatingSystem) {
|
if ([Environment]::Is64BitOperatingSystem) {
|
||||||
$vm_exe = 6
|
$vm_exe = 6
|
||||||
} else { $vm_exe = 3 }
|
}
|
||||||
|
else { $vm_exe = 3 }
|
||||||
Break
|
Break
|
||||||
}
|
}
|
||||||
Default { throw [LoginError]::new('Unknown Voicemeeter type') }
|
Default { throw [LoginError]::new('Unknown Voicemeeter type') }
|
||||||
@ -277,9 +279,11 @@ Function Login {
|
|||||||
if (-not $retval) { Write-Host("STARTING VOICEMEETER") }
|
if (-not $retval) { Write-Host("STARTING VOICEMEETER") }
|
||||||
else { Throw [CAPIError]::new($retval, $MyInvocation.MyCommand) }
|
else { Throw [CAPIError]::new($retval, $MyInvocation.MyCommand) }
|
||||||
Start-Sleep -s 1
|
Start-Sleep -s 1
|
||||||
} elseif ($retval -eq -2) {
|
}
|
||||||
|
elseif ($retval -eq -2) {
|
||||||
throw [LoginError]::new('Login may only be called once per session')
|
throw [LoginError]::new('Login may only be called once per session')
|
||||||
} else { Exit }
|
}
|
||||||
|
else { Exit }
|
||||||
}
|
}
|
||||||
catch [LoginError], [CAPIError] {
|
catch [LoginError], [CAPIError] {
|
||||||
Write-Warning $_.Exception.ErrorMessage()
|
Write-Warning $_.Exception.ErrorMessage()
|
||||||
|
@ -4,8 +4,7 @@ class Bus {
|
|||||||
[Int]$id
|
[Int]$id
|
||||||
|
|
||||||
# Constructor
|
# Constructor
|
||||||
Bus ([Int]$id)
|
Bus ([Int]$id) {
|
||||||
{
|
|
||||||
$this.id = $id
|
$this.id = $id
|
||||||
|
|
||||||
AddBoolMembers -PARAMS @('mono', 'mute')
|
AddBoolMembers -PARAMS @('mono', 'mute')
|
||||||
|
@ -2,8 +2,7 @@
|
|||||||
|
|
||||||
class Special {
|
class Special {
|
||||||
# Constructor
|
# Constructor
|
||||||
Special()
|
Special() {
|
||||||
{
|
|
||||||
AddActionMembers -PARAMS @('restart', 'shutdown', 'show')
|
AddActionMembers -PARAMS @('restart', 'shutdown', 'show')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,8 +2,7 @@ class MacroButton {
|
|||||||
[int32]$id
|
[int32]$id
|
||||||
|
|
||||||
# Constructor
|
# Constructor
|
||||||
MacroButton ([Int]$id)
|
MacroButton ([Int]$id) {
|
||||||
{
|
|
||||||
$this.id = $id
|
$this.id = $id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,9 +2,8 @@
|
|||||||
|
|
||||||
class Recorder {
|
class Recorder {
|
||||||
# Constructor
|
# Constructor
|
||||||
Recorder()
|
Recorder() {
|
||||||
{
|
AddActionMembers -PARAMS @('play', 'stop', 'pause', 'replay', 'record', 'ff', 'rew')
|
||||||
AddActionMembers -PARAMS @('play', 'stop', 'pause', 'replay', 'record', 'ff', 'rw')
|
|
||||||
AddChannelMembers
|
AddChannelMembers
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -3,8 +3,7 @@
|
|||||||
class Strip {
|
class Strip {
|
||||||
[Int]$id
|
[Int]$id
|
||||||
|
|
||||||
Strip ([Int]$id)
|
Strip ([Int]$id) {
|
||||||
{
|
|
||||||
$this.id = $id
|
$this.id = $id
|
||||||
|
|
||||||
AddBoolMembers -PARAMS @('mono', 'solo', 'mute')
|
AddBoolMembers -PARAMS @('mono', 'solo', 'mute')
|
||||||
|
@ -3,8 +3,7 @@ class Vban {
|
|||||||
[String]$direction
|
[String]$direction
|
||||||
|
|
||||||
# Constructor
|
# Constructor
|
||||||
Vban($id)
|
Vban($id) {
|
||||||
{
|
|
||||||
$this.id = $id
|
$this.id = $id
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user