Table of Contents

Class AudioStream

Namespace
NAudio.MacOS.CoreAudio
Assembly
NAudio.MacOS.dll

The AudioStream class represents a stream of audio data that can be either provided to, or receieved from the associated AudioDevice object.
An AudioStream is providing all the required information to the callers to understand the data format the HAL requires for audio transactions.

public sealed class AudioStream : AudioObject, IEquatable<AudioObject>, IEqualityOperators<AudioObject, AudioObject, bool>
Inheritance
AudioStream
Implements
Inherited Members

Properties

Direction

Returns a AudioStreamDirection value indicating whether this AudioStream is an output or input stream.

public AudioStreamDirection Direction { get; }

Property Value

AudioStreamDirection
See Also

IsActive

A bool where a true value indicates that the stream is enabled and doing IO.

public bool IsActive { get; }

Property Value

bool

Latency

A uint containing the number of frames of latency in the AudioStream. Note that the owning AudioDevice may have additional latency so it should be queried as well. If both the device and the stream say they have latency, then the total latency for the stream is the device latency summed with the stream latency.

public uint Latency { get; }

Property Value

uint

PhysicalFormat

A WaveFormat that describes the current data format for the AudioStream. The physical format refers to the data format in which the hardware for the owning AudioDevice performs its IO transactions.

public WaveFormat PhysicalFormat { get; }

Property Value

WaveFormat

PhysicalFormats

An array of RangedWaveFormat that describe the available data formats for the AudioStream. The physical format refers to the data format in which the hardware for the owning AudioDevice performs its IO transactions.

public RangedWaveFormat[] PhysicalFormats { get; }

Property Value

RangedWaveFormat[]

StartingChannel

A uint that specifies the first element in the owning device that corresponds to element one of this stream.

public uint StartingChannel { get; }

Property Value

uint

TerminalType

A AudioStreamTerminalType whose value describes the general kind of functionality attached to the AudioStream.

public AudioStreamTerminalType TerminalType { get; }

Property Value

AudioStreamTerminalType
See Also

VirtualFormat

A WaveFormat that describes the current data format for the AudioStream. The virtual format refers to the data format in which all I/O procedures for the owning AudioDevice will perform I/O transactions.

public WaveFormat VirtualFormat { get; set; }

Property Value

WaveFormat

VirtualFormats

An array of RangedWaveFormat that describe the available data formats for the AudioStream. The virtual format refers to the data format in which all IOProcs for the owning AudioDevice will perform IO transactions.

public RangedWaveFormat[] VirtualFormats { get; }

Property Value

RangedWaveFormat[]

Methods

ConstructVirtualFormatChangedEvent()

Provides the way for creating an event handle when the contents of the VirtualFormat property do change.

public PropertyListenerHandle ConstructVirtualFormatChangedEvent()

Returns

PropertyListenerHandle

A new PropertyListenerHandle that can be used to listen to changes of the VirtualFormat property.
It's OriginatingObject property value is this AudioStream instance.