Audio Endpoint Volume
Inheritance: IDisposable
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
 }
Ejemplo n.º 4
0
 internal AudioEndpointVolumeCallback(AudioEndpointVolume parent)
 {
     this.parent = parent;
 }
Ejemplo n.º 5
0
        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;
            }
        }