private void timer_Tick(object sender, EventArgs e) { bool isProcessRunning = SwitchAudio.IsAnyProcessRuning(GetProcesses()); //Don't need constant switch if (isProcessRunning && currentSetting.Text != "VR") { switchVR(); } else if (!isProcessRunning && currentSetting.Text != "Default") { switchDefault(); } }
private void switchDefault() { SwitchAudio.SwitchDevice(defaultAudio.Text, defaultMicrophone.Text); currentSetting.Text = "Default"; }
private void switchVR() { SwitchAudio.SwitchDevice(VRAudio.Text, VRMicrophone.Text); currentSetting.Text = "VR"; }