Class WASAPIAudioCaptureDeviceSourceSettings
- Namespace
- VisioForge.Core.Types.X.Sources
- Assembly
- VisioForge.Core.dll
WASAPI audio capture device source settings.
public class WASAPIAudioCaptureDeviceSourceSettings : IAudioCaptureDeviceSourceSettings, IVideoCaptureBaseAudioSourceSettings, IMediaBlockSettings, IAudioVolumeMuteInheritance
Implements
Inherited Members
Constructors
WASAPIAudioCaptureDeviceSourceSettings(AudioCaptureDeviceInfo, AudioCaptureDeviceFormat)
Initializes a new instance of the VisioForge.Core.Types.X.Sources.WASAPIAudioCaptureDeviceSourceSettings class.
public WASAPIAudioCaptureDeviceSourceSettings(AudioCaptureDeviceInfo device, AudioCaptureDeviceFormat format)Parameters
deviceAudioCaptureDeviceInfo-
The device.
formatAudioCaptureDeviceFormat-
The format.
Properties
API
Gets or sets the API.
public AudioCaptureDeviceAPI API { get; }Property Value
BufferTime
Gets or sets the size of the audio buffer held by the device, and the maximum latency the source reports. Larger values make capture tolerant of CPU spikes; smaller values reduce latency at the cost of dropped audio when the machine stalls. Set to Zero or a negative value to leave the element default untouched. The resolution is one microsecond; a smaller positive value is raised to it, and anything above 10 seconds is capped.
public TimeSpan BufferTime { get; set; }Property Value
Device
Gets or sets the device.
public AudioCaptureDeviceInfo Device { get; set; }Property Value
Exclusive
Gets or sets a value indicating whether to open the device in exclusive mode.
public bool Exclusive { get; set; }Property Value
Format
Gets or sets the format.
public AudioCaptureDeviceFormat Format { get; set; }Property Value
LatencyTime
Gets or sets the minimum amount of data read in each iteration, and the minimum latency the source reports. Set to Zero or a negative value to leave the element default untouched. The resolution is one microsecond; a smaller positive value is raised to it, and anything above 10 seconds is capped.
public TimeSpan LatencyTime { get; set; }Property Value
Loopback
Gets or sets a value indicating whether to open the sink device for loopback recording.
public bool Loopback { get; set; }Property Value
LowLatency
Gets or sets a value indicating whether to optimize all settings for lowest latency.
public bool LowLatency { get; set; }Property Value
Role
Gets or sets the role of the device.
public WASAPIDeviceRole Role { get; set; }Property Value
UseAudioClient3
Gets or sets a value indicating whether to use the Windows 10 AudioClient3 API when available
public bool UseAudioClient3 { get; set; }Property Value
Methods
CreateBlock()
Creates the block.
public MediaBlock CreateBlock()Returns
- MediaBlock
-
MediaBlock.
GetMute()
Gets the mute.
public bool GetMute()Returns
- bool
-
trueif successful,falseotherwise.
GetVolume()
Gets the volume. Value should be in 0.0 - 1.0 range.
public double GetVolume()Returns
- double
-
System.Double.
IsSupported()
Determines whether this interface is supported.
public bool IsSupported()Returns
- bool
-
trueif this interface is supported; otherwise,false.
SetInterface(IAudioVolumeMute)
Sets the interface.
public void SetInterface(IAudioVolumeMute intf)Parameters
intfIAudioVolumeMute-
The interface.
SetMute(bool)
Sets the mute.
public void SetMute(bool mute)Parameters
mutebool-
if set to
truemute.
SetVolume(double)
Sets the volume. Value should be in 0.0 - 1.0 range.
public void SetVolume(double volume)Parameters
volumedouble-
The volume.