mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-09 17:33:33 +00:00
Compare commits
5 Commits
add-more-l
...
907ee3e63b
| Author | SHA1 | Date | |
|---|---|---|---|
| 907ee3e63b | |||
| f3ed9c28c7 | |||
| d305a4048d | |||
| 108731b4cf | |||
| e7c648f1d0 |
12
README.md
12
README.md
@@ -8,9 +8,9 @@ For past/future changes to this project refer to: [CHANGELOG](CHANGELOG.md)
|
|||||||
|
|
||||||
## Tested against
|
## Tested against
|
||||||
|
|
||||||
- Basic 1.0.8.8
|
- Basic 1.1.1.1
|
||||||
- Banana 2.0.6.8
|
- Banana 2.1.1.1
|
||||||
- Potato 3.0.2.8
|
- Potato 3.1.1.1
|
||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
@@ -402,6 +402,8 @@ The following commands are available:
|
|||||||
The following methods are available:
|
The following methods are available:
|
||||||
|
|
||||||
- Load($filepath): string
|
- Load($filepath): string
|
||||||
|
- RunMacrobuttons(): Launches the macrobuttons app
|
||||||
|
- CloseMacrobuttons(): Closes the macrobuttons app
|
||||||
|
|
||||||
example:
|
example:
|
||||||
|
|
||||||
@@ -411,6 +413,8 @@ $vmr.command.show
|
|||||||
$vmr.command.lock = $true
|
$vmr.command.lock = $true
|
||||||
|
|
||||||
$vmr.command.Load("path/to/filename.xml")
|
$vmr.command.Load("path/to/filename.xml")
|
||||||
|
|
||||||
|
$vmr.command.RunMacrobuttons()
|
||||||
```
|
```
|
||||||
|
|
||||||
### Recorder
|
### Recorder
|
||||||
@@ -566,4 +570,4 @@ Run tests from repository root in a subshell and write logs, like so:
|
|||||||
|
|
||||||
### Official Documentation
|
### Official Documentation
|
||||||
|
|
||||||
- [Voicemeeter Remote C API](https://github.com/onyx-and-iris/Voicemeeter-SDK/blob/update-docs/VoicemeeterRemoteAPI.pdf)
|
- [Voicemeeter Remote C API](https://github.com/onyx-and-iris/Voicemeeter-SDK/blob/main/VoicemeeterRemoteAPI.pdf)
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ function RunVoicemeeter {
|
|||||||
function P_Dirty {
|
function P_Dirty {
|
||||||
$retval = [Voicemeeter.Remote]::VBVMR_IsParametersDirty()
|
$retval = [Voicemeeter.Remote]::VBVMR_IsParametersDirty()
|
||||||
if ($retval -notin @(0, 1)) {
|
if ($retval -notin @(0, 1)) {
|
||||||
throw [CAPIError]::new($retval, "VBVMR_RunVoicemeeter")
|
throw [CAPIError]::new($retval, "VBVMR_IsParametersDirty")
|
||||||
}
|
}
|
||||||
[bool]$retval
|
[bool]$retval
|
||||||
}
|
}
|
||||||
@@ -61,7 +61,7 @@ function P_Dirty {
|
|||||||
function M_Dirty {
|
function M_Dirty {
|
||||||
$retval = [Voicemeeter.Remote]::VBVMR_MacroButton_IsDirty()
|
$retval = [Voicemeeter.Remote]::VBVMR_MacroButton_IsDirty()
|
||||||
if ($retval -notin @(0, 1)) {
|
if ($retval -notin @(0, 1)) {
|
||||||
throw [CAPIError]::new($retval, "VBVMR_RunVoicemeeter")
|
throw [CAPIError]::new($retval, "VBVMR_MacroButton_IsDirty")
|
||||||
}
|
}
|
||||||
[bool]$retval
|
[bool]$retval
|
||||||
}
|
}
|
||||||
@@ -156,7 +156,7 @@ function MB_Get {
|
|||||||
New-Variable -Name ptr -Value 0.0
|
New-Variable -Name ptr -Value 0.0
|
||||||
$retval = [int][Voicemeeter.Remote]::VBVMR_MacroButton_GetStatus($ID, [ref]$ptr, $MODE)
|
$retval = [int][Voicemeeter.Remote]::VBVMR_MacroButton_GetStatus($ID, [ref]$ptr, $MODE)
|
||||||
if ($retval -notin @(0)) {
|
if ($retval -notin @(0)) {
|
||||||
throw [CAPIError]::new($retval, $MyInvocation.MyCommand)
|
throw [CAPIError]::new($retval, "VBVMR_MacroButton_GetStatus")
|
||||||
}
|
}
|
||||||
[int]$ptr
|
[int]$ptr
|
||||||
}
|
}
|
||||||
|
|||||||
16
lib/inst.ps1
16
lib/inst.ps1
@@ -1,11 +1,17 @@
|
|||||||
function Get_VMPath {
|
function Get_VMPath {
|
||||||
$REG_KEY = "Registry::HKEY_LOCAL_MACHINE\Software" + `
|
$REG_KEY = @(
|
||||||
(& { if ([Environment]::Is64BitOperatingSystem) { "\WOW6432Node" } else { "" } }) + `
|
"Registry::HKEY_LOCAL_MACHINE",
|
||||||
"\Microsoft\Windows\CurrentVersion\Uninstall"
|
"Software",
|
||||||
$VM_KEY = "\VB:Voicemeeter {17359A74-1236-5467}\"
|
(& { if ([Environment]::Is64BitOperatingSystem) { "WOW6432Node" } else { "" } }),
|
||||||
|
"Microsoft",
|
||||||
|
"Windows",
|
||||||
|
"CurrentVersion",
|
||||||
|
"Uninstall"
|
||||||
|
).Where({ $_ -ne "" }) -Join "\"
|
||||||
|
$VM_KEY = "VB:Voicemeeter {17359A74-1236-5467}"
|
||||||
|
|
||||||
try {
|
try {
|
||||||
return $(Get-ItemPropertyValue -Path ($REG_KEY + $VM_KEY) -Name UninstallString | Split-Path -Parent)
|
return $(Get-ItemPropertyValue -Path (@($REG_KEY, $VM_KEY) -Join "\") -Name UninstallString | Split-Path -Parent)
|
||||||
}
|
}
|
||||||
catch {
|
catch {
|
||||||
throw [VMRemoteError]::new("Unable to fetch Voicemeeter path from the Registry.")
|
throw [VMRemoteError]::new("Unable to fetch Voicemeeter path from the Registry.")
|
||||||
|
|||||||
Reference in New Issue
Block a user