예제 #1
0
        private void MMNotificationClient_DefaultDeviceChanged(object sender, DefaultDeviceChangedEventArgs e)
        {
            if (e.DeviceId == _lastDefaultDeviceChanged)
                return;

            _lastDefaultDeviceChanged = e.DeviceId;
            if (CurrentSoundOutDevice?.Id == WindowsDefaultId)
                Application.Current.Dispatcher.BeginInvoke(new Action(OnInvalidateSoundOut));

            Application.Current.Dispatcher.BeginInvoke(new Action(UpdateDefaultAudioDevice));
        }
예제 #2
0
        void _mmNotificationClient_DefaultDeviceChanged(object sender, DefaultDeviceChangedEventArgs e)
        {
            if (e.DeviceID == _lastDefaultDeviceChanged) return;
            _lastDefaultDeviceChanged = e.DeviceID;
            if (HurricaneSettings.Instance.Config.SoundOutDeviceID == DefaultDevicePlaceholder && e.DeviceID != _currentDeviceId)
            {
                if (RefreshSoundOut != null)
                    Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal,
                        new Action(OnRefreshSoundOut));
            }

            Application.Current.Dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(UpdateDefaultAudioDevice));
        }