AVBlocks for .NET  2.3
Audio and Video Software Development Kit
AudioStreamInfo Class Reference

Describes an elementary audio stream. More...

Inheritance diagram for AudioStreamInfo:
StreamInfo

Public Member Functions

 AudioStreamInfo ()
 Constructs a default AudioStreamInfo object. More...
 
override void Reset ()
 Resets the audio stream information to its default state. More...
 
- Public Member Functions inherited from StreamInfo
virtual object Clone ()
 Creates a deep copy of this object. More...
 

Properties

int BitsPerSample [get, set]
 The number of valid bits per sample (sample resolution). More...
 
int BytesPerFrame [get, set]
 The number of bytes occupied by an audio frame (smallest descrete unit). More...
 
AudioChannelFlags ChannelLayout [get, set]
 The channel layout defines the mapping between channels and speakers. More...
 
int Channels [get, set]
 The number of audio channels in the stream. More...
 
PcmFlags PcmFlags [get, set]
 Various properties of the audio stream. More...
 
int SampleRate [get, set]
 The audio sample rate in Hz. More...
 
- Properties inherited from StreamInfo
int Bitrate [get, set]
 The stream bitrate expressed in bits per second. More...
 
BitrateMode BitrateMode [get, set]
 The stream bitrate mode. More...
 
double Duration [get, set]
 The stream duration in seconds. More...
 
int ID [get, set]
 The ID of the elementary stream. More...
 
virtual bool Immutable [get, protected set]
 Returns whether the object is immutable. More...
 
MediaType MediaType [get]
 Media type. More...
 
int ProgramNumber [get, set]
 The number of the program to which the elementary stream belongs. More...
 
StreamSubType StreamSubType [get, set]
 The stream subtype. More...
 
StreamType StreamType [get, set]
 The stream type. More...
 

Detailed Description

Describes an elementary audio stream.

Constructor & Destructor Documentation

Constructs a default AudioStreamInfo object.

Member Function Documentation

override void Reset ( )
virtual

Resets the audio stream information to its default state.

Reimplemented from StreamInfo.

Property Documentation

int BitsPerSample
getset

The number of valid bits per sample (sample resolution).

Common values are 8, 16, 20, 24 and 32.

Normally BitsPerSample sample is defined only for uncompressed audio streams. For compressed audio it is not defined and is 0. However it is possible for a compressed audio stream to return a positive value as an indication of audio quality. It can also designate the bits per sample of the LPCM stream once the compressed stream is decoded.

int BytesPerFrame
getset

The number of bytes occupied by an audio frame (smallest descrete unit).

A frame is the smallest descrete unit in an audio stream. It may contain one or more samples. Depending on the audio stream type the frame may contain fixed or variable number of samples.

For compressed streams the frame size is variable even if there are fixed number of samples in each frame. In this case BytesPerFrame is 0.

For an LCPM stream the frame size is constant. In this case BytesPerFrame is greater than 0.
Normally for interleaved LPCM streams the following is true:

  • BytesPerFrame / ChannelCount == SampleSize
  • The valid bits in a sample are given by AudioStreamInfo.BitsPerSample and they are aligned towards the hi-order byte.
AudioChannelFlags ChannelLayout
getset

The channel layout defines the mapping between channels and speakers.

int Channels
getset

The number of audio channels in the stream.

Various properties of the audio stream.

int SampleRate
getset

The audio sample rate in Hz.