Trying to understand why certain issues are happening

How to use Voicemeeter Remote API and control Voicemeeter Audio Engine
Post Reply
chris.oakley
Posts: 5
Joined: Tue Sep 12, 2023 1:06 pm

Trying to understand why certain issues are happening

Post by chris.oakley »

We've been integrating with VoiceMeeter for a number of years now and rarely had any issues, so never had to delve too deeply into anything API related.

However we recently had a user say they couldn't get the Command.Button(0).State=1 command to work. Commands like Strip(0).Mute=1 worked, but the Macro Buttons did nothing.

I tried myself and this was indeed correct.

So after much fiddling and testing I decided to uninstall Voicemeeter, restart my machine, re-install the latest version, restart my machine again and then copied the voicemeeterremote.dll into our application folder, as per usual, and now it all seems to be working.

What I'm trying to figure out though, before it was working, when sending a command that failed, the call to VBVMR_SetParameters would return -2, and I can't find anything anywhere that tells me what that return code means. In it's working state it returns 0, which I take as good.

Are there any logs generated by voicemeeterremote.dll or VoiceMeeter itself that can be viewed?
onyx_online
Posts: 2
Joined: Mon May 11, 2020 8:36 pm

Re: Trying to understand why certain issues are happening

Post by onyx_online »

Hi. You may find a description of the error codes returned by the C Remote API in the VoicemeeterRemote header file
Vincent Burel
Site Admin
Posts: 2020
Joined: Sun Jan 17, 2010 12:01 pm

Re: Trying to understand why certain issues are happening

Post by Vincent Burel »

VBVMR_SetParameters returning -2 could mean Voicemeeter is not running.
chris.oakley
Posts: 5
Joined: Tue Sep 12, 2023 1:06 pm

Re: Trying to understand why certain issues are happening

Post by chris.oakley »

Thanks for these. According to the doc -2 means an unexpected login, which I don't understand. Voicemeeter was certainly running.

I did find if I uninstalled, rebooted, installed latest, rebooted then copied the dll to my app folder, it then behaved.
Vincent Burel
Site Admin
Posts: 2020
Joined: Sun Jan 17, 2010 12:01 pm

Re: Trying to understand why certain issues are happening

Post by Vincent Burel »

you must not copy the DLL.
you must use the one installed with Voicemeeter Package. as it is explained in the API documentation.
otherwise you could have compatibility problem (and some error could appear, simply because you have not the right DLL for the right Voicemeeter).

Also the DLL could considers being in the same folder than Voicemeeter package.
chris.oakley
Posts: 5
Joined: Tue Sep 12, 2023 1:06 pm

Re: Trying to understand why certain issues are happening

Post by chris.oakley »

Okay, I get that. I need a reliable way to know where the dll is however. It's not good practice to assume it's in the "C:\Program Files (x86)\VB\Voicemeeter" folder, this is the reason we copy it, so we know where it is.

Is there a system variable added at install for Voicemeeter?
Vincent Burel
Site Admin
Posts: 2020
Joined: Sun Jan 17, 2010 12:01 pm

Re: Trying to understand why certain issues are happening

Post by Vincent Burel »

the procedure is giving in the doc.

you have also the question replied in the second message of this topic:
viewtopic.php?t=346
chris.oakley
Posts: 5
Joined: Tue Sep 12, 2023 1:06 pm

Re: Trying to understand why certain issues are happening

Post by chris.oakley »

Thanks. However the issue I have is the framework I'm using doesn't allow me to declare an API using a variable. So I can't get the location from the registry and then declare the aqi so it's a moot point really. It needs to be static at compile time.

So really I have two options:

1. Continue with the way we do and copy the dll
2. Assume the install is in Program Files (x86)
Vincent Burel
Site Admin
Posts: 2020
Joined: Sun Jan 17, 2010 12:01 pm

Re: Trying to understand why certain issues are happening

Post by Vincent Burel »

select solution 2

- check first the presence in Program Files (x86)/VB/Voicemeeter
if not present
- check in Program Files/VB/Voicemeeter (this will be installed there on 32 bits system).

there is no way to install Voicemeeter in another folder.
chris.oakley
Posts: 5
Joined: Tue Sep 12, 2023 1:06 pm

Re: Trying to understand why certain issues are happening

Post by chris.oakley »

Thanks for your help with this Vincent.
Post Reply