Vincent Burel wrote:yes of course, it's programmed like a standard microsoft dll, you can use it with any language able to call _stdcall functions.
Edit: I got past that message by changing the unsigned short * to a wchar_t *.
Now I have a very basic C++ program, and I've copied the code from vmr_client.c over.
I changed it to a console app to make it easier to follow, with the entry point as int main().
I called the InitializeDLLInterfaces() function from vmr_client.c, and I get a result of zero back (no error). VBVMR_RunVoicemeeter(3) also works (an integer 0 is returned), and I also see Voicemeeter open on my desktop.
But for some reason, when I run
iVMR.VBVMR_SetParameterFloat("Command.Restart", 1.0f);
... I get a -1 error.
This other command also gives me a -1 error as well:
iVMR.VBVMR_SetParameterFloat("Strip[5].mute", 1.0f);
If I just want to mute / unmute a channel, are there any other things I need to do besides call InitializeDLLInterfaces(), which also calls RegistryGetVoicemeeterFolder and also executes iVMR.VBVMR_Login?
Here is my code from int main():
Code: Select all
int main(array<System::String^>^ args)
{
int resp = 99;
resp = InitializeDLLInterfaces();
printf("InitializeDLLInterfaces result: %d\n", resp);
resp = 99;
resp = iVMR.VBVMR_SetParameterFloat("Command.Restart", 1.0f);
printf("Command.Restart result: %d\n", resp);
resp = 99;
resp = iVMR.VBVMR_IsParametersDirty();
printf("IsParametersDirty result: %d\n", resp);
resp = 99;
resp = iVMR.VBVMR_SetParameterFloat("Strip[5].mute", 1.0f);
printf("Strip[5].mute result: %d\n", resp);
if (iVMR.VBVMR_Logout != NULL) {
iVMR.VBVMR_Logout();
printf("Logged out.\n");
}
if (iVMR.VBVMR_AudioCallbackUnregister != NULL) {
iVMR.VBVMR_AudioCallbackUnregister();
printf("AudioCallback unregistered.\n");
}
return 0;
}
Here is the output from my console window:
Code: Select all
InitializeDLLInterfaces called.
InitializeDLLInterfaces: GetVoicemeeterType: 268448720
InitializeDLLInterfaces: GetVoicemeeterVersion: 268448784
InitializeDllInterfaces: iVMR.VBVMR_Login: 268448432
InitializeDLLInterfaces result: 0
Command.Restart result: -1
IsParametersDirty result: -1
Strip[5].mute result: -1
Logged out.
AudioCallback unregistered.