private void AudioEndpointVolumeChanged(AudioVolumeNotificationData data) { if (_lockedVolume.HasValue) { _audioDevice.AudioEndpointVolume.MasterVolumeLevel = _lockedVolume.Value; } DeviceVolumeChanged?.Invoke(); }
private void OnEndpointVolumeChanged(object sender, AudioEndpointVolumeCallbackEventArgs e) { if (!_isNotifyEnabled) { _isNotifyEnabled = true; return; } DeviceVolumeChanged?.Invoke(this); }
private void OnEndpointVolumeChanged(AudioVolumeNotificationData data) { if (!_isNotifyEnabled) { _isNotifyEnabled = true; return; } DeviceVolumeChanged?.Invoke(this); }
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); } }
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); } }