Page 1 of 1

Issue starting VM Programatically (Bug?)

Posted: Wed Sep 13, 2023 7:57 pm
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

Re: Issue starting VM Programatically (Bug?)

Posted: Mon Sep 18, 2023 6:58 pm
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.

Re: Issue starting VM Programatically (Bug?)

Posted: Mon Sep 18, 2023 7:30 pm
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

Re: Issue starting VM Programatically (Bug?)

Posted: Thu Nov 16, 2023 6:41 pm
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 ??

Re: Issue starting VM Programatically (Bug?)

Posted: Sun Dec 31, 2023 8:29 am
by Vincent Burel
i'm going to take a look on this problem.