From e7e4f37678b60dce1b2db6b025f752fbba0797e9 Mon Sep 17 00:00:00 2001 From: Jaime Filho Date: Sun, 5 Mar 2023 13:50:20 -0300 Subject: [PATCH] Add support for capture options in WASAPI loopback --- NAudio.Wasapi/WasapiLoopbackCapture.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/NAudio.Wasapi/WasapiLoopbackCapture.cs b/NAudio.Wasapi/WasapiLoopbackCapture.cs index 9d45e869..4e1b01e4 100644 --- a/NAudio.Wasapi/WasapiLoopbackCapture.cs +++ b/NAudio.Wasapi/WasapiLoopbackCapture.cs @@ -27,6 +27,27 @@ public WasapiLoopbackCapture(MMDevice captureDevice) : { } + /// + /// Initializes a new instance of the class. + /// + /// The capture device. + /// true if sync is done with event. false use sleep. + public WasapiLoopbackCapture(MMDevice captureDevice, bool useEventSync) : + base(captureDevice, useEventSync) + { + } + + /// + /// Initializes a new instance of the class. + /// + /// The capture device. + /// true if sync is done with event. false use sleep. + /// Length of the audio buffer in milliseconds. A lower value means lower latency but increased CPU usage. + public WasapiLoopbackCapture(MMDevice captureDevice, bool useEventSync, int audioBufferMillisecondsLength) : + base(captureDevice, useEventSync, audioBufferMillisecondsLength) + { + } + /// /// Gets the default audio loopback capture device ///