Table of Contents

Class AudioInfoX

Namespace
VisioForge.Core.Types.X
Assembly
VisioForge.Core.dll

Represents detailed audio format information for use within the MediaBlocks framework. This class defines properties such as the audio sample format, sample rate, and number of channels.

public class AudioInfoX

Inheritance

Inherited Members

Examples

// Create an AudioInfoX instance for stereo, 48kHz, 16-bit signed little-endian audio.
var audioInfo = new AudioInfoX(AudioFormatX.S16LE, 48000, 2);

Console.WriteLine($"Audio Format: {audioInfo.Format}");
Console.WriteLine($"Sample Rate: {audioInfo.SampleRate} Hz");
Console.WriteLine($"Channels: {audioInfo.Channels}");

// This audioInfo object can then be used to configure an audio encoder or renderer.
// audioEncoder.SetAudioInfo(audioInfo);

Remarks

This information is crucial for configuring audio processing blocks, encoders, and renderers, ensuring that audio data is handled correctly throughout the pipeline.

Constructors

AudioInfoX()

Initializes a new instance of the VisioForge.Core.Types.X.AudioInfoX class with default values.

public AudioInfoX()

AudioInfoX(AudioFormatX, int, int)

Initializes a new instance of the VisioForge.Core.Types.X.AudioInfoX class with specified format, sample rate, and channels.

public AudioInfoX(AudioFormatX format, int sampleRate, int channels)

Parameters

format AudioFormatX

The VisioForge.Core.Types.X.AudioFormatX of the audio.

sampleRate int

The sample rate in Hz.

channels int

The number of channels.

Properties

Channels

Gets or sets the number of audio channels. The default value is 2 (stereo).

public int Channels { get; set; }

Property Value

int

Format

Gets or sets the audio sample format. The default value is VisioForge.Core.Types.X.AudioFormatX.S16LE.

public AudioFormatX Format { get; set; }

Property Value

AudioFormatX

SampleRate

Gets or sets the audio sample rate in Hertz (Hz). The default value is 48000 Hz.

public int SampleRate { get; set; }

Property Value

int

Methods

ToString()

Returns a string that represents the current VisioForge.Core.Types.X.AudioInfoX instance. The string includes the audio format, sample rate, and number of channels.

public override string ToString()

Returns

string

A String that represents this instance.