예제 #1
0
        private void AudioEndpointVolumeChanged(AudioVolumeNotificationData data)
        {
            if (_lockedVolume.HasValue)
            {
                _audioDevice.AudioEndpointVolume.MasterVolumeLevel = _lockedVolume.Value;
            }

            DeviceVolumeChanged?.Invoke();
        }
예제 #2
0
        private void OnEndpointVolumeChanged(object sender, AudioEndpointVolumeCallbackEventArgs e)
        {
            if (!_isNotifyEnabled)
            {
                _isNotifyEnabled = true;
                return;
            }

            DeviceVolumeChanged?.Invoke(this);
        }
예제 #3
0
        private void OnEndpointVolumeChanged(AudioVolumeNotificationData data)
        {
            if (!_isNotifyEnabled)
            {
                _isNotifyEnabled = true;
                return;
            }

            DeviceVolumeChanged?.Invoke(this);
        }
예제 #4
0
 private void RaiseDeviceVolumeChanged(int id, int volume, bool isMuted)
 {
     if (SynchronizationContext.Current != _synchronizationContext)
     {
         _synchronizationContext.Post(o => DeviceVolumeChanged?.Invoke(this, id, volume, isMuted), null);
     }
     else
     {
         DeviceVolumeChanged?.Invoke(this, id, volume, isMuted);
     }
 }
예제 #5
0
 private void RaiseDeviceVolumeChanged(int id, int volume, bool isMuted, DeviceFlow deviceFlow)
 {
     if (_stopping)
     {
         return;
     }
     if (SynchronizationContext.Current != _synchronizationContext)
     {
         _synchronizationContext.Post(o => DeviceVolumeChanged?.Invoke(this, id, volume, isMuted, deviceFlow), null);
     }
     else
     {
         DeviceVolumeChanged?.Invoke(this, id, volume, isMuted, deviceFlow);
     }
 }