mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-01-18 05:10:48 +00:00
check size of script
This commit is contained in:
parent
2ad8118f2c
commit
1df92afcfe
@ -188,6 +188,9 @@ function Set_By_Script {
|
||||
param(
|
||||
[string]$script
|
||||
)
|
||||
if ($script.Length -gt 48000) {
|
||||
throw [VMError]::new("Script size cannot be larger than 48kB")
|
||||
}
|
||||
$retval = [int][Voicemeeter.Remote]::VBVMR_SetParameters($script)
|
||||
if ($retval -notin @(0)) {
|
||||
throw [CAPIError]::new($retval, "VBVMR_SetParameters")
|
||||
|
Loading…
Reference in New Issue
Block a user