Exemplo n.º 1
0
        public DgMic()
        {
            MMDeviceEnumerator enumerator = new MMDeviceEnumerator();

            _devices = enumerator.EnumerateAudioEndpoints(EDataFlow.ECapture,
                                                          EDeviceState.DeviceStateActive);
            _count = _devices.Count;

            for (int i = 0; i < _count; i++)
            {
                _devices[i].AudioEndpointVolume.OnVolumeNotification += AudioEndpointVolume_OnVolumeNotification;
            }
        }