Audio Endpoint Volume
Inheritance: IDisposable
Beispiel #1
0
        private void GetAudioEndpointVolume()
        {
            object result;

            Marshal.ThrowExceptionForHR(deviceInterface.Activate(ref IID_IAudioEndpointVolume, ClsCtx.ALL, IntPtr.Zero, out result));
            _AudioEndpointVolume = new AudioEndpointVolume(result as IAudioEndpointVolume);
        }
Beispiel #2
0
		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;
 }
Beispiel #4
0
 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;
            }
        }