2023-08-16 02:52:12 +01:00
|
|
|
. $PSScriptRoot\inst.ps1
|
|
|
|
|
2022-10-27 21:20:03 +01:00
|
|
|
function Setup_DLL {
|
2023-08-16 02:52:12 +01:00
|
|
|
$VMPATH = Get_VMPath
|
|
|
|
|
|
|
|
$dll = Join-Path -Path $VMPATH -ChildPath ("VoicemeeterRemote" + `
|
|
|
|
(& { if ([Environment]::Is64BitOperatingSystem) { "64" } else { "" } }) + `
|
|
|
|
".dll")
|
2022-06-25 23:12:02 +01:00
|
|
|
|
|
|
|
$Signature = @"
|
|
|
|
[DllImport(@"$dll")]
|
|
|
|
public static extern int VBVMR_Login();
|
|
|
|
[DllImport(@"$dll")]
|
|
|
|
public static extern int VBVMR_Logout();
|
|
|
|
[DllImport(@"$dll")]
|
|
|
|
public static extern int VBVMR_RunVoicemeeter(Int64 run);
|
|
|
|
[DllImport(@"$dll")]
|
|
|
|
public static extern int VBVMR_GetVoicemeeterType(ref int ptr);
|
2022-10-27 21:20:03 +01:00
|
|
|
[DllImport(@"$dll")]
|
|
|
|
public static extern int VBVMR_GetVoicemeeterVersion(ref int ptr);
|
2022-06-25 23:12:02 +01:00
|
|
|
|
|
|
|
[DllImport(@"$dll")]
|
|
|
|
public static extern int VBVMR_MacroButton_IsDirty();
|
|
|
|
[DllImport(@"$dll")]
|
|
|
|
public static extern int VBVMR_MacroButton_SetStatus(Int64 id, Single state, Int64 mode);
|
|
|
|
[DllImport(@"$dll")]
|
|
|
|
public static extern int VBVMR_MacroButton_GetStatus(Int64 id, ref float ptr, Int64 mode);
|
|
|
|
|
|
|
|
[DllImport(@"$dll")]
|
|
|
|
public static extern int VBVMR_IsParametersDirty();
|
|
|
|
[DllImport(@"$dll")]
|
|
|
|
public static extern int VBVMR_SetParameterFloat(String param, Single value);
|
|
|
|
[DllImport(@"$dll")]
|
|
|
|
public static extern int VBVMR_GetParameterFloat(String param, ref float ptr);
|
|
|
|
|
|
|
|
[DllImport(@"$dll")]
|
|
|
|
public static extern int VBVMR_SetParameterStringA(String param, String value);
|
|
|
|
[DllImport(@"$dll")]
|
|
|
|
public static extern int VBVMR_GetParameterStringA(String param, byte[] buff);
|
|
|
|
|
|
|
|
[DllImport(@"$dll")]
|
|
|
|
public static extern int VBVMR_SetParameters(String param);
|
2023-08-09 14:16:27 +01:00
|
|
|
|
|
|
|
[DllImport(@"$dll")]
|
|
|
|
public static extern int VBVMR_GetLevel(Int64 mode, Int64 index, ref float ptr);
|
2022-06-25 23:12:02 +01:00
|
|
|
"@
|
|
|
|
|
|
|
|
Add-Type -MemberDefinition $Signature -Name Remote -Namespace Voicemeeter -PassThru | Out-Null
|
2023-08-16 02:52:12 +01:00
|
|
|
return $VMPATH
|
2022-10-27 21:20:03 +01:00
|
|
|
}
|