UtilNAudioGetDefaultSoundCaptureDevice Method
Gets the default sound capture device.
Namespace: DevCase.ThirdParty.NAudioAssembly: DevCase.net48.ThirdParty.NAudio (in DevCase.net48.ThirdParty.NAudio.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
public static MMDevice GetDefaultSoundCaptureDevice(
Role role
)
Public Shared Function GetDefaultSoundCaptureDevice (
role As Role
) As MMDevice
Dim role As Role
Dim returnValue As MMDevice
returnValue = UtilNAudio.GetDefaultSoundCaptureDevice(role)
public:
static MMDevice^ GetDefaultSoundCaptureDevice(
Role role
)
static member GetDefaultSoundCaptureDevice :
role : Role -> MMDevice
No code example is currently available or this language may not be supported.
- role Role
-
Specifies the device role.
MMDevice
The resulting
MMDevice.
Note: Some functionalities of this assembly may require to install one or all of the listed NuGet packages:
NAudio
This is a code example.
No code example is currently available or this language may not be supported.
Dim device As MMDevice = GetDefaultSoundCaptureDevice(Role.Multimedia)
Console.WriteLine($"{NameOf(device.FriendlyName)}: {device.FriendlyName}, {NameOf(device.DeviceFriendlyName)}: {device.DeviceFriendlyName}, {NameOf(device.State)}: {device.State}")
Dim capture As New WasapiCapture(device, useEventSync:=False, audioBufferMillisecondsLength:=100)
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.