public void UpdateMutebtnText()
        {
            bool mutestatus = MicDeviceUtils.GetMuteStatus();

            if (mutestatus)
            {
                mutebtnText.text = "Unmute";
            }
            else
            {
                mutebtnText.text = "Mute";
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Call this to force BSIPA to update the config file. This is also called by BSIPA if it detects the file was modified.
        /// </summary>
        public virtual void Changed()
        {
            //Update audio device
            MicDeviceUtils.SelectConfiguredMic(MicDeviceID);
            //Mute depending on push-to-talk or push-to-mute
            if (PTTEnabled)
            {
                MicDeviceUtils.SetMicMute(!PTTInverted);
            }

            //Toggle mute button screen
            if (Plugin.startupReady)
            {
                if (ScreenEnabled)
                {
                    MuteButtonWindowController.Instance.ShowMuteWindow();
                }
                else if (MuteButtonWindowController.Instance.MuteButtonScreen != null)
                {
                    MuteButtonWindowController.Instance.Cleanup();
                }
            }
        }