Ejemplo n.º 1
0
        private void GetAudioEndpointVolume()
        {
            object result;

            Marshal.ThrowExceptionForHR(_RealDevice.Activate(ref IIDs.IID_IAudioEndpointVolume, CLSCTX.ALL, IntPtr.Zero, out result));
            _AudioEndpointVolume = new AudioEndpointVolume(result as IAudioEndpointVolume);
        }
Ejemplo n.º 2
0
 public VolumeControl(AudioEndpointVolume endpointVol)
 {
     getVolume = () => endpointVol.MasterVolumeLevelScalar;
     setVolume = (volume) => endpointVol.MasterVolumeLevelScalar = volume;
     isMuted = () => endpointVol.Mute;
     setMuted = (mute) => endpointVol.Mute = mute;
 }
 internal AudioEndpointVolumeCallback(AudioEndpointVolume parent)
 {
     _Parent = parent;
 }
Ejemplo n.º 4
0
 internal AudioEndpointVolumeCallback(AudioEndpointVolume parent)
 {
     _Parent = parent;
 }
Ejemplo n.º 5
0
 private void GetAudioEndpointVolume()
 {
     object result;
     Marshal.ThrowExceptionForHR(_RealDevice.Activate(ref IIDs.IID_IAudioEndpointVolume, CLSCTX.ALL, IntPtr.Zero, out result));
     _AudioEndpointVolume = new AudioEndpointVolume(result as IAudioEndpointVolume);
 }