public VmClient()
        {
            //Find Voicemeeter dir.
            var vmDir = GetVoicemeeterDir();

            VoiceMeeterRemote.LoadDll(System.IO.Path.Combine(vmDir, "VoicemeeterRemote64.dll"));
            var lr = VoiceMeeterRemote.Login();

            switch (lr)
            {
            case VbLoginResponse.OK:
                Console.WriteLine("Attached.");
                break;

            case VbLoginResponse.AlreadyLoggedIn:
                Console.WriteLine("Attached. Was already logged in");
                break;

            case VbLoginResponse.OkVoicemeeterNotRunning:
                //Launch.
                Console.WriteLine("Attached. VM Not running.");
                break;

            default:
                throw new InvalidOperationException("Bad response from voicemeeter: " + lr);
            }
        }
        public float GetParam(string n)
        {
            float output = -1;

            VoiceMeeterRemote.GetParameter(n, ref output);
            return(output);
        }
Ejemplo n.º 3
0
        public float GetMacroStatus(int buttonId)
        {
            float value = 0;

            VoiceMeeterRemote.GetMacroStatus(buttonId, ref value, 0);
            return(value);
        }
Ejemplo n.º 4
0
        public VmClient()
        {
            //Find Voicemeeter dir.
            var vmDir = GetVoicemeeterDir();

            VoiceMeeterRemote.LoadDll(System.IO.Path.Combine(vmDir, "VoicemeeterRemote.dll"));
            LoginResponse = VoiceMeeterRemote.Login();
        }
 protected virtual void Dispose(bool disposing)
 {
     if (!disposed)
     {
         Console.WriteLine($"VmClient Disposing {disposing}");
         _onClose?.Invoke();
         VoiceMeeterRemote.Logout();
     }
     disposed = true;
 }
Ejemplo n.º 6
0
        public VmClient()
        {
            //Find Voicemeeter dir.
            var vmDir = GetVoicemeeterDir();

            VoiceMeeterRemote.LoadDll(System.IO.Path.Combine(vmDir, "VoicemeeterRemote.dll"));

            bool connected = false;

            Process[] processes = Process.GetProcessesByName("voicemeeter8");

            while (processes.Length == 0)
            {
                System.Threading.Thread.Sleep(1000);
                processes = Process.GetProcessesByName("voicemeeter8");
            }

            while (!connected)
            {
                System.Threading.Thread.Sleep(1000);
                var lr = VoiceMeeterRemote.Login();

                switch (lr)
                {
                case VbLoginResponse.OK:
                    Console.WriteLine("Attached.");
                    connected = true;
                    break;

                case VbLoginResponse.AlreadyLoggedIn:
                    Console.WriteLine("Attached. Was already logged in");
                    connected = true;
                    break;

                case VbLoginResponse.OkVoicemeeterNotRunning:
                    Console.WriteLine("Attached. VM Not running.");
                    break;

                default:
                    throw new InvalidOperationException("Bad response from voicemeeter: " + lr);
                }

                if (!connected)
                {
                    VoiceMeeterRemote.Logout();
                }
            }
        }
 public bool Poll()
 {
     return(VoiceMeeterRemote.IsParametersDirty() == 1);
 }
 public void SetParam(string n, float v)
 {
     VoiceMeeterRemote.SetParameter(n, v);
 }
Ejemplo n.º 9
0
 public int Poll()
 {
     return(VoiceMeeterRemote.IsParametersDirty());
 }
Ejemplo n.º 10
0
 public void SetParameters(string parameters)
 {
     VoiceMeeterRemote.SetParameters(parameters);
 }
Ejemplo n.º 11
0
 public void SetMacroStatus(int buttonId, float value)
 {
     VoiceMeeterRemote.SetMacroStatus(buttonId, value, 0);
 }