private void GetAudioEndpointVolume() { object result; Marshal.ThrowExceptionForHR(deviceInterface.Activate(ref IID_IAudioEndpointVolume, ClsCtx.ALL, IntPtr.Zero, out result)); _AudioEndpointVolume = new AudioEndpointVolume(result as IAudioEndpointVolume); }
private void GetAudioEndpointVolume() { object result; Marshal.ThrowExceptionForHR(deviceInterface.Activate(ref IID_IAudioEndpointVolume, ClsCtx.ALL, IntPtr.Zero, out result)); _AudioEndpointVolume = new AudioEndpointVolume(result as IAudioEndpointVolume); }
internal AudioEndpointVolumeCallback(AudioEndpointVolume parent) { _Parent = parent; }
internal AudioEndpointVolumeCallback(AudioEndpointVolume parent) { this.parent = parent; }
protected AudioLevelManager(MMDevice mmdevice, DeviceType direction) { Provider = DeviceProvider.Wasapi; DeviceDirection = direction; this.mmdevice = mmdevice; mmDeviceVolume = mmdevice.AudioEndpointVolume; SetValue(IsAttachedProperty, mmDeviceVolume != null); if (mmDeviceVolume != null) { mmDeviceVolume.OnVolumeNotification += mmDeviceVolume_OnVolumeNotification; Min = mmDeviceVolume.VolumeRange.MinDecibels; Max = mmDeviceVolume.VolumeRange.MaxDecibels; Level = mmDeviceVolume.MasterVolumeLevel; } }