This documentation is for the old version. Go to the latest Graphics Mill docs

AviAudioManager Class

This class encapsulates audio-related features of the AVI Processor.

Namespace: Aurigma.GraphicsMill.Codecs
Assembly: Aurigma.GraphicsMill.Codecs.AviProcessor (in Aurigma.GraphicsMill.Codecs.AviProcessor.dll)

Syntax

Visual Basic
Public NotInheritable Class AviAudioManager _
	Inherits LockableObject
C#
public sealed class AviAudioManager : LockableObject

Remarks

AVI files can contain not only video data, but also audio data as well. One file can contain several audio tracks (or streams) synchronized with video. When the AVI movie is played, one of audio streams is used. Advanced video players enables the user to select which audio stream to play, simpler players always play only the first stream. This way you can create AVI files which contains audio tracks in different languages, etc.

AVI Processor can both read and write audio data from/to AVI files. To provide this functionality both AviReader and AviWriter have the property named AudioManager which returns an instance of this class.

This class implements two kinds of methods and properties: one works only when the audio manager object is returned from the AviReader and another - when it is returned from AviWriter. If you try to extract audio data from the writer or add it to reader, an appropriate method will fail. Let's examine both these groups of members.

Reader-related Members

Writer-related Members

Note

There is a caveat when you add audio data to the writer. When adding or appending audio, you can specify what to do if the audio stream become longer than video stream. You can either truncate it to fit video stream or have the player to play audio data even if the video sequence stops. If you truncate the audio data, you should keep in mind that it takes into account only that video data which is already added to the writer before you add audio. That's why you should do it after you add all necessary video frames.

In addition to this, you can get duration of WAV files using the GetAudioDuration(String) static method.

Inheritance Hierarchy

System.Object
L Aurigma.GraphicsMill.LockableObject
L Aurigma.GraphicsMill.Codecs.AviAudioManager

Thread Safety

Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.

See Also

Reference