mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2025-01-18 13:20:47 +00:00
check size of script
This commit is contained in:
parent
2ad8118f2c
commit
1df92afcfe
@ -188,6 +188,9 @@ function Set_By_Script {
|
|||||||
param(
|
param(
|
||||||
[string]$script
|
[string]$script
|
||||||
)
|
)
|
||||||
|
if ($script.Length -gt 48000) {
|
||||||
|
throw [VMError]::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)) {
|
||||||
throw [CAPIError]::new($retval, "VBVMR_SetParameters")
|
throw [CAPIError]::new($retval, "VBVMR_SetParameters")
|
||||||
|
Loading…
Reference in New Issue
Block a user