Class ASIOSourceSettings
- Namespace
- VisioForge.Core.Types.X.Sources
- Assembly
- VisioForge.Core.dll
Settings of an ASIO capture device (Windows): the driver, the input channels to capture and the
driver buffer size. Get the device from
VisioForge.Core.DeviceEnumerator.AudioSourcesAsync(System.Nullable{VisioForge.Core.Types.X.Sources.AudioCaptureDeviceAPI},System.Threading.CancellationToken)
with VisioForge.Core.Types.X.Sources.AudioCaptureDeviceAPI.ASIO. Usable with VisioForge.Core.MediaBlocks.Sources.ASIOSourceBlock and as
VideoCaptureCoreX.Audio_Source.
public class ASIOSourceSettings : IAudioCaptureDeviceSourceSettings, IVideoCaptureBaseAudioSourceSettings, IMediaBlockSettings, IAudioVolumeMuteInheritance
Implements
Inherited Members
Constructors
ASIOSourceSettings()
Initializes a new instance of the VisioForge.Core.Types.X.Sources.ASIOSourceSettings class with no device.
public ASIOSourceSettings()ASIOSourceSettings(AudioCaptureDeviceInfo, AudioCaptureDeviceFormat)
Initializes a new instance of the VisioForge.Core.Types.X.Sources.ASIOSourceSettings class.
public ASIOSourceSettings(AudioCaptureDeviceInfo device, AudioCaptureDeviceFormat format = null)Parameters
deviceAudioCaptureDeviceInfo-
The ASIO capture device.
formatAudioCaptureDeviceFormat-
The format the stream is described with;
nulltakes the device's default.
Exceptions
- ArgumentNullException
-
deviceisnull. - ArgumentException
-
deviceis not an ASIO device.
Properties
API
Gets the API, always VisioForge.Core.Types.X.Sources.AudioCaptureDeviceAPI.ASIO.
public AudioCaptureDeviceAPI API { get; }Property Value
BufferSize
Gets or sets the driver buffer size in samples. 0 uses the driver's preferred size.
public uint BufferSize { get; set; }Property Value
Channels
Gets or sets the zero-based input channels to capture, in ascending order. The stream carries
one channel per entry. null or empty captures every input channel of the device.
public int[] Channels { get; set; }Property Value
- int[]
Device
Gets or sets the ASIO device. Its VisioForge.Core.Types.X.Sources.AudioCaptureDeviceInfo.DevicePath is the driver CLSID.
public AudioCaptureDeviceInfo Device { get; set; }Property Value
Exceptions
- ArgumentException
-
The device is not an ASIO device.
Format
Gets or sets the sample format and rate the stream is described with, such as to the
VideoCaptureCoreX outputs; when it is null, the stream is described with the device's
default. Its channel count is not used and does not report the stream's: the stream has one
channel per entry of VisioForge.Core.Types.X.Sources.ASIOSourceSettings.Channels, or every input channel of the device. The format is not applied to the device: ASIO captures in the driver's own format
and rate, and the block converts and resamples for whatever follows it.
public AudioCaptureDeviceFormat Format { get; set; }Property Value
Methods
CreateBlock()
Creates the VisioForge.Core.MediaBlocks.Sources.ASIOSourceBlock these settings describe.
public MediaBlock CreateBlock()Returns
- MediaBlock
-
The block.
GetMute()
Gets the current mute state of the audio.
public bool GetMute()Returns
- bool
-
trueif the audio is muted; otherwise,false.
GetVolume()
Gets the current audio volume level.
public double GetVolume()Returns
- double
-
A double value representing the current volume, typically in the range of 0.0 to 1.0.
IsSupported()
Determines whether this audio volume and mute interface is supported by the current component.
public bool IsSupported()Returns
- bool
-
trueif this interface is supported; otherwise,false.
SetInterface(IAudioVolumeMute)
Sets an internal interface for audio volume and mute control. This method is typically used by the framework to link different components that manage audio.
public void SetInterface(IAudioVolumeMute intf)Parameters
intfIAudioVolumeMute-
The VisioForge.Core.Types.X.IAudioVolumeMute interface to set.
SetMute(bool)
Sets the mute state of the audio.
public void SetMute(bool mute)Parameters
mutebool-
If set to
true, the audio will be muted; otherwise, it will be unmuted.
SetVolume(double)
Sets the audio volume level.
public void SetVolume(double volume)Parameters
volumedouble-
The volume level, typically a double value in the range of 0.0 (silent) to 1.0 (full volume). Values outside this range might be clamped or result in amplification depending on the implementation.
ToString()
Returns a string that represents the current object.
public override string ToString()Returns
- string
-
A string that represents the current object.