Example #1
0
        internal void RegisterDevice(EDataFlow RenderType)
        {
            if (EndPoints.DeviceNames.Count == 0) return;

            Device = EndPoints.pEnum.GetDefaultAudioEndpoint(RenderType, ERole.eMultimedia);
            Value = Device.AudioEndpointVolume.MasterVolumeLevelScalar;
            Mute = Device.AudioEndpointVolume.Mute;
            Stereo = Device.AudioMeterInformation.Channels.GetCount() > 1;
            Device.AudioSessionManager.Sessions[0].RegisterAudioSessionNotification(volEvents);
            Device.AudioEndpointVolume.OnVolumeNotification += VolNotify;
        }
 internal void RegisterDevice(EDataFlow RenderType)
 {
     Device = EndPoints.DeviceEnumerator.GetDefaultAudioEndpoint(RenderType, ERole.eMultimedia);
     Value = Device.AudioEndpointVolume.MasterVolumeLevelScalar;
     Mute = Device.AudioEndpointVolume.Mute;
     Stereo = Device.AudioMeterInformation.Channels.GetCount() > 1;
     Device.AudioEndpointVolume.OnVolumeNotification += VolNotify;
 }