Пример #1
0
        public static List <CaptureDevice> GetLoopbackCaptureDevices()
        {
            CaptureDevice        defaultDevice = GetDefaultLoopbackCaptureDevice();
            List <CaptureDevice> list          = new List <CaptureDevice>();
            MMDeviceEnumerator   devices       = new MMDeviceEnumerator();

            foreach (MMDevice mmd in devices.EnumerateAudioEndPoints(DataFlow.Render, DeviceState.Active))
            {
                list.Add(new CaptureDevice(mmd, mmd == defaultDevice.MMDevice));
            }
            return(list);
        }
Пример #2
0
 /// <summary>
 /// Initialises a new instance of the WASAPI capture class
 /// </summary>
 /// <param name="captureDevice">Capture device to use</param>
 public WasapiLoopbackCapture2(CaptureDevice captureDevice) :
     base(captureDevice.MMDevice)
 {
 }