mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-04-20 04:03:55 +01:00
Compare commits
4 Commits
907ee3e63b
...
fbfab5b4aa
Author | SHA1 | Date | |
---|---|---|---|
fbfab5b4aa | |||
4d371a7582 | |||
15b3b375bd | |||
c8abc6964a |
20
CHANGELOG.md
20
CHANGELOG.md
@ -9,7 +9,19 @@ Before any major/minor/patch is released all test units will be run to verify th
|
|||||||
|
|
||||||
## [Unreleased] These changes have not been added to PSGallery yet
|
## [Unreleased] These changes have not been added to PSGallery yet
|
||||||
|
|
||||||
## [3.2.0]
|
- [ ]
|
||||||
|
|
||||||
|
## [3.3.0] - 2024-06-29
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- Add a timeout (2s) to the login function. If timeout exceeded a VMRemoteError is thrown.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- Launch x64 bit GUIs for all kinds if on 64 bit system.
|
||||||
|
|
||||||
|
## [3.2.0] - 2023-08-17
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
@ -21,10 +33,10 @@ Before any major/minor/patch is released all test units will be run to verify th
|
|||||||
|
|
||||||
- All CAPIErrors are now exposed to the consumer.
|
- All CAPIErrors are now exposed to the consumer.
|
||||||
- The function name and error code can be retrieved using [CAPIError].function and [CAPIError].code
|
- The function name and error code can be retrieved using [CAPIError].function and [CAPIError].code
|
||||||
- Set_By_Script now throws [VMError] if script length exceeds 48kB.
|
- Set_By_Script now throws [VMRemoteError] if script length exceeds 48kB.
|
||||||
- parameter range checks in Vban class.
|
- parameter range checks in Vban class.
|
||||||
|
|
||||||
## [3.1.0]
|
## [3.1.0] - 2023-08-15
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
|
||||||
@ -33,7 +45,7 @@ Before any major/minor/patch is released all test units will be run to verify th
|
|||||||
- More Recorder commands implemented. See Recorder section in README.
|
- More Recorder commands implemented. See Recorder section in README.
|
||||||
- RunMacrobuttons, CloseMacrobuttons added to Special class
|
- RunMacrobuttons, CloseMacrobuttons added to Special class
|
||||||
|
|
||||||
## [3.0.0]
|
## [3.0.0] - 2023-08-09
|
||||||
|
|
||||||
v3 introduces some breaking changes. They are as follows:
|
v3 introduces some breaking changes. They are as follows:
|
||||||
|
|
||||||
|
28
lib/base.ps1
28
lib/base.ps1
@ -20,8 +20,27 @@ function Login {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$timeout = New-TimeSpan -Seconds 2
|
||||||
|
$sw = [diagnostics.stopwatch]::StartNew()
|
||||||
|
$exception = $null
|
||||||
|
do {
|
||||||
|
Start-Sleep -m 100
|
||||||
|
try {
|
||||||
|
"Successfully logged into Voicemeeter [" + $(VmType).ToUpper() + "] Version " + $(VmVersion) | Write-Verbose
|
||||||
|
$exception = $null
|
||||||
|
break
|
||||||
|
}
|
||||||
|
catch [CAPIError] {
|
||||||
|
$exception = $_
|
||||||
|
$exception | Write-Debug
|
||||||
|
}
|
||||||
|
} while ($sw.elapsed -lt $timeout)
|
||||||
|
|
||||||
|
if ($null -ne $exception) {
|
||||||
|
throw [VMRemoteError]::new("Timeout logging into the API.")
|
||||||
|
}
|
||||||
|
|
||||||
while (P_Dirty -or M_Dirty) { Start-Sleep -m 1 }
|
while (P_Dirty -or M_Dirty) { Start-Sleep -m 1 }
|
||||||
"Successfully logged into Voicemeeter [" + $(VmType).ToUpper() + "] Version " + $(VmVersion) | Write-Verbose
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function Logout {
|
function Logout {
|
||||||
@ -38,8 +57,8 @@ function RunVoicemeeter {
|
|||||||
[string]$kindId
|
[string]$kindId
|
||||||
)
|
)
|
||||||
$kinds = @{
|
$kinds = @{
|
||||||
"basic" = 1
|
"basic" = $(if ([Environment]::Is64BitOperatingSystem) { 4 } else { 1 })
|
||||||
"banana" = 2
|
"banana" = $(if ([Environment]::Is64BitOperatingSystem) { 5 } else { 2 })
|
||||||
"potato" = $(if ([Environment]::Is64BitOperatingSystem) { 6 } else { 3 })
|
"potato" = $(if ([Environment]::Is64BitOperatingSystem) { 6 } else { 3 })
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,7 +66,6 @@ function RunVoicemeeter {
|
|||||||
if ($retval -notin @(0)) {
|
if ($retval -notin @(0)) {
|
||||||
throw [CAPIError]::new($retval, "VBVMR_RunVoicemeeter")
|
throw [CAPIError]::new($retval, "VBVMR_RunVoicemeeter")
|
||||||
}
|
}
|
||||||
Start-Sleep -s 1
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function P_Dirty {
|
function P_Dirty {
|
||||||
@ -189,7 +207,7 @@ function Set_By_Script {
|
|||||||
[string]$script
|
[string]$script
|
||||||
)
|
)
|
||||||
if ($script.Length -gt 48000) {
|
if ($script.Length -gt 48000) {
|
||||||
throw [VMError]::new("Script size cannot be larger than 48kB")
|
throw [VMRemoteError]::new("Script size cannot be larger than 48kB")
|
||||||
}
|
}
|
||||||
$retval = [int][Voicemeeter.Remote]::VBVMR_SetParameters($script)
|
$retval = [int][Voicemeeter.Remote]::VBVMR_SetParameters($script)
|
||||||
if ($retval -notin @(0)) {
|
if ($retval -notin @(0)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user