mirror of
https://github.com/onyx-and-iris/voicemeeter-api-powershell.git
synced 2026-04-18 13:33:31 +00:00
VBVMR_GetLevel binding added
Get_Level implemented in base.ps1
strip.{PreFader,PostFader,PostMute} methods added
bus.{All} added
This commit is contained in:
17
lib/base.ps1
17
lib/base.ps1
@@ -23,7 +23,7 @@ function Login {
|
||||
New-Variable -Name vmExe -Value 0
|
||||
|
||||
if ( $kindId -eq "basic" ) { $vmExe = 1 }
|
||||
elseif ( $kindId -eq "banana" ) { $vmExe = 2 }
|
||||
elseif ( $kindId -eq "banana" ) { $vmExe = 2 }
|
||||
elseif ( $kindId -eq "potato" ) {
|
||||
$vmExe = $(if ([Environment]::Is64BitOperatingSystem) { 6 } else { 3 })
|
||||
}
|
||||
@@ -203,3 +203,18 @@ function Set_By_Script {
|
||||
Write-Warning $_.Exception.ErrorMessage()
|
||||
}
|
||||
}
|
||||
|
||||
function Get_Level {
|
||||
param(
|
||||
[int64]$MODE, [int64]$INDEX
|
||||
)
|
||||
New-Variable -Name ptr -Value 0.0
|
||||
try {
|
||||
$retval = [int][Voicemeeter.Remote]::VBVMR_GetLevel($MODE, $INDEX, [ref]$ptr)
|
||||
if ($retval) { throw [CAPIError]::new($retval, $MyInvocation.MyCommand) }
|
||||
}
|
||||
catch [CAPIError] {
|
||||
Write-Warning $_.Exception.ErrorMessage()
|
||||
}
|
||||
[float]$ptr
|
||||
}
|
||||
Reference in New Issue
Block a user