Class LoopbackAudioCaptureDeviceSourceSettings
- Namespace
- VisioForge.Core.Types.X.Sources
- Assembly
- VisioForge.Core.dll
Loopback audio capture device source settings.
public class LoopbackAudioCaptureDeviceSourceSettings : IAudioCaptureDeviceSourceSettings, IVideoCaptureBaseAudioSourceSettings, IMediaBlockSettings, IAudioVolumeMuteInheritance
Implements
Inherited Members
Constructors
LoopbackAudioCaptureDeviceSourceSettings(AudioOutputDeviceInfo)
Initializes a new instance of the VisioForge.Core.Types.X.Sources.LoopbackAudioCaptureDeviceSourceSettings class.
public LoopbackAudioCaptureDeviceSourceSettings(AudioOutputDeviceInfo device)Parameters
deviceAudioOutputDeviceInfo-
The device.
LoopbackAudioCaptureDeviceSourceSettings(AudioOutputDeviceInfo, BaseContext)
Initializes a new instance of the VisioForge.Core.Types.X.Sources.LoopbackAudioCaptureDeviceSourceSettings class with a logging context.
public LoopbackAudioCaptureDeviceSourceSettings(AudioOutputDeviceInfo device, BaseContext context)Parameters
deviceAudioOutputDeviceInfo-
The device.
contextBaseContext-
Optional context for structured logging. When null, output falls back to Trace.
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
Context
Gets or sets the context for structured logging.
public BaseContext Context { get; set; }Property Value
Device
Gets or sets the name.
public AudioOutputDeviceInfo Device { 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
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.
IsInterfaceWired()
Returns true if the volume/mute interface has been wired via VisioForge.Core.Types.X.Sources.LoopbackAudioCaptureDeviceSourceSettings.SetInterface(VisioForge.Core.Types.X.IAudioVolumeMute). It does not perform any runtime feature probe, and it is no longer an alias for VisioForge.Core.Types.X.Sources.LoopbackAudioCaptureDeviceSourceSettings.IsSupported: that member now asks the capture element whether the controls actually exist.
public bool IsInterfaceWired()Returns
- bool
-
trueif the interface has been wired; otherwise,false.
IsSupported()
Returns true if the capture element in use actually carries volume and mute controls.
public bool IsSupported()Returns
- bool
-
trueif the controls are present; otherwise,false.
Remarks
Forwarded to the block this settings object is attached to, so it answers for the element actually in use and only once that block has been built. It used to report merely that VisioForge.Core.Types.X.Sources.LoopbackAudioCaptureDeviceSourceSettings.SetInterface(VisioForge.Core.Types.X.IAudioVolumeMute) had been called, which said yes on every backend including the ones with no such controls; VisioForge.Core.Types.X.Sources.LoopbackAudioCaptureDeviceSourceSettings.IsInterfaceWired is still that wiring check, and is now the only member that means it.
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.