Issue starting VM Programatically (Bug?)

How to use Voicemeeter Remote API and control Voicemeeter Audio Engine
Post Reply
simmondp
Posts: 15
Joined: Tue Feb 09, 2021 4:43 pm

Issue starting VM Programatically (Bug?)

Post by simmondp »

I need to have both Potato and the MacroButton started

If I start Potato manually or by putting it in the start-up then I can set VM to also start the MacroButtons

If (as I need to) start it programatically, as it interfaces to a shim to a control surface. Using: VBVMR_RunVoicemeeter(long vType) then it does not seem to honour the setting to also start MacroButtons.

Looking in the .h file, there does not seem to be a separate VBVMR_Run..... call for the MacroButton, or any way to programatically load them.?

Have I missed something, or is this a bug?

Thanks

Paul
onyx_online
Posts: 2
Joined: Mon May 11, 2020 8:36 pm

Re: Issue starting VM Programatically (Bug?)

Post by onyx_online »

Hi.

I suspect this is not a bug but instead the intended behaviour. I doubt VBVMR_RunVoicemeeter is supposed to also start the macrobuttons app. I don't know what language you're using but you might be able to launch the macrobuttons app without the api. An example in python might look like:

Code: Select all

    def run_macrobuttons(self) -> int:
        """launches the macrobuttons app. returns its pid"""
        exe_path = vm_path.parent.joinpath("VoicemeeterMacroButtons.exe")
        try:
            process = subprocess.Popen([exe_path])
            return process.pid
        except OSError as e:
            self.logger.exception(f"{type(e).__name__}: {e}")
            raise VMError("unable to launch the macrobuttons application") from e
where vm_path in the above code is a pathlib.Path object pointing to the Voicemeeter installation directory.
simmondp
Posts: 15
Joined: Tue Feb 09, 2021 4:43 pm

Re: Issue starting VM Programatically (Bug?)

Post by simmondp »

Thanks, yes I'm sure there are ways to do it, but we need to ideally do it using the DLL.

My point was, Voicemeeter is, by design, able to start the MacroButtons when it starts.

However, if it starts using the DLL, then it ignores that setting (but still supports the others like "restart A1" etc.)

This would be fine, if you could also use a DLL call to start the MacroButtons, but it appears one does not exist.

Paul
simmondp
Posts: 15
Joined: Tue Feb 09, 2021 4:43 pm

Re: Issue starting VM Programatically (Bug?)

Post by simmondp »

@vincent - or anyone else - any thoughts about how I can start the Macrobuttons from the API or get Voicemeeter to honour the "start macrobuttons" selection in VM when it's started via the API ??
Vincent Burel
Site Admin
Posts: 2020
Joined: Sun Jan 17, 2010 12:01 pm

Re: Issue starting VM Programatically (Bug?)

Post by Vincent Burel »

i'm going to take a look on this problem.
Post Reply