Class AudioCaptureDeviceInfo
- Namespace
- VisioForge.Core.Types.VideoCapture
- Assembly
- VisioForge.Core.dll
Represents comprehensive information about an audio capture device including its capabilities, supported formats, input lines, and available configuration dialogs.
public class AudioCaptureDeviceInfoInheritance
Inherited Members
Remarks
This class uses lazy initialization for device properties to improve performance. Device information is only retrieved when accessed for the first time through the VisioForge.Core.Types.VideoCapture.AudioCaptureDeviceInfo.OnInitiateRequired event mechanism.
Constructors
AudioCaptureDeviceInfo(string)
Initializes a new instance of the VisioForge.Core.Types.VideoCapture.AudioCaptureDeviceInfo class with the specified device name.
public AudioCaptureDeviceInfo(string name)Parameters
namestring-
The display name of the audio capture device.
Remarks
This constructor only sets the device name. Other properties must be populated later using the VisioForge.Core.Types.VideoCapture.AudioCaptureDeviceInfo.Fill(System.Collections.Generic.List{System.String},System.Collections.Generic.List{System.String},System.String) and VisioForge.Core.Types.VideoCapture.AudioCaptureDeviceInfo.FillDialogs(System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean) methods.
Properties
DevicePath
Gets the unique device path that identifies this audio capture device in the system.
public string DevicePath { get; }Property Value
Remarks
Accessing this property triggers device initialization if not already initialized.
DialogCaptureDisplay
Gets a value indicating whether the device supports a capture display dialog.
public bool DialogCaptureDisplay { get; }Property Value
Remarks
The capture display dialog allows configuration of display-related capture settings. Accessing this property triggers device initialization if not already initialized.
DialogCaptureFormat
Gets a value indicating whether the device supports a capture format dialog.
public bool DialogCaptureFormat { get; }Property Value
Remarks
The capture format dialog allows users to configure audio format settings such as sample rate, bit depth, and channel configuration. Accessing this property triggers device initialization if not already initialized.
DialogCaptureSource
Gets a value indicating whether the device supports a capture source dialog.
public bool DialogCaptureSource { get; }Property Value
Remarks
The capture source dialog allows selection of input sources or lines. Accessing this property triggers device initialization if not already initialized.
DialogCompressorAbout
Gets a value indicating whether the device supports a compressor about dialog.
public bool DialogCompressorAbout { get; }Property Value
Remarks
The compressor about dialog typically displays information about the compression codec or algorithm used by the device. Accessing this property triggers device initialization if not already initialized.
DialogCompressorConfig
Gets a value indicating whether the device supports a compressor configuration dialog.
public bool DialogCompressorConfig { get; }Property Value
Remarks
The compressor configuration dialog allows adjustment of compression settings if the device includes built-in audio compression capabilities. Accessing this property triggers device initialization if not already initialized.
DialogDefault
Gets a value indicating whether the device supports a default configuration dialog.
public bool DialogDefault { get; }Property Value
Remarks
The default dialog typically provides general device configuration options. Accessing this property triggers device initialization if not already initialized.
Formats
Gets a list of all audio formats supported by this capture device.
public List<string> Formats { get; }Property Value
Remarks
Accessing this property triggers device initialization if not already initialized. The format list is populated by querying the device capabilities.
Initiated
Gets a value indicating whether the device information has been initialized.
public bool Initiated { get; }Property Value
Remarks
This property is used for lazy initialization. Device information is only loaded when first accessed to improve performance.
Lines
Gets a list of available audio input lines for this capture device.
public List<string> Lines { get; }Property Value
Remarks
Accessing this property triggers device initialization if not already initialized. Not all audio devices support input line selection.
Name
Gets the display name of the audio capture device.
public string Name { get; }Property Value
Methods
Fill(List<string>, List<string>, string)
Populates the device information with input lines, supported formats, and device path.
public void Fill(List<string> lines, List<string> formats, string devicePath)Parameters
linesList<string>-
A list of available input lines for the audio device.
formatsList<string>-
A list of supported audio formats.
devicePathstring-
The unique system path identifying this device.
Remarks
This method is typically called in response to the VisioForge.Core.Types.VideoCapture.AudioCaptureDeviceInfo.OnInitiateRequired event to populate the device information when first accessed.
FillDialogs(bool, bool, bool, bool, bool, bool)
Populates the device dialog availability information.
public void FillDialogs(bool default_, bool captureDisplay, bool captureFormat, bool captureSource, bool compressorConfig, bool compressorAbout)Parameters
default_bool-
Indicates whether the device supports a default configuration dialog.
captureDisplaybool-
Indicates whether the device supports a capture display dialog.
captureFormatbool-
Indicates whether the device supports a capture format dialog.
captureSourcebool-
Indicates whether the device supports a capture source selection dialog.
compressorConfigbool-
Indicates whether the device supports a compressor configuration dialog.
compressorAboutbool-
Indicates whether the device supports a compressor about/information dialog.
Remarks
This method is typically called along with VisioForge.Core.Types.VideoCapture.AudioCaptureDeviceInfo.Fill(System.Collections.Generic.List{System.String},System.Collections.Generic.List{System.String},System.String) to complete the device information initialization process.
ToString()
Returns a string representation of the audio capture device.
public override string ToString()Returns
- string
-
The name of the audio capture device.
Remarks
This method returns the device name without triggering initialization, making it safe to use in UI lists and debug output.
OnInitiateRequired
Occurs when device initialization is required due to accessing a property for the first time.
public event EventHandler<EventArgs> OnInitiateRequiredEvent Type
Remarks
This event is raised when any device property is accessed before the device has been initialized. Subscribers should handle this event to perform the actual device initialization by calling methods like VisioForge.Core.Types.VideoCapture.AudioCaptureDeviceInfo.Fill(System.Collections.Generic.List{System.String},System.Collections.Generic.List{System.String},System.String) and VisioForge.Core.Types.VideoCapture.AudioCaptureDeviceInfo.FillDialogs(System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean,System.Boolean).