C# Class GAudio.AGATAudioFile

Base class for reading ogg and uncompressed wav files, from disk or memory streams. Use OpenAudioFileAtPath to retrieve an instance. GATPathsHelper provides handy methods for converting relative paths to absolute paths. Don't forget to call Dispose() to close the file and release resources!
Inheritance: IDisposable
Afficher le fichier Open project: gregzo/G-Audio Class Usage Examples

Méthodes publiques

Свойство Type Description
filePath string

Protected Properties

Свойство Type Description
_readChunkSize int

Méthodes publiques

Méthode Description
Dispose ( ) : void

Releases all resource used by the GATAsyncWavWriter object.

Call Dispose when you are finished using the GATAsyncWavWriter. The Dispose method leaves the GATAsyncWavWriter in an unusable state. After calling Dispose, you must release all references to the GATAsyncWavWriter so the garbage collector can reclaim the memory that the GATAsyncWavWriter was occupying.

OpenAudioFileAtPath ( string path ) : AGATAudioFile

Creates and returns a ready to use AGATAudioFile object. Wrap in a try catch block if you are not sure that the file type is supported.

OpenAudioFileFromStream ( Stream stream, string format ) : AGATAudioFile

Creates and returns a ready to use AGATAudioFile object. Wrap in a try catch block if you are not sure that the file type is supported.

ReadNextChunk ( float target, int offset, int numFrames ) : int

Reads the next chunk into the target array at offset. Multichannel data is always interleaved.

Méthodes protégées

Méthode Description
AGATAudioFile ( ) : System
AGATAudioFile ( string path ) : System
FreeResources ( ) : void

Private Methods

Méthode Description
Dispose ( bool explicitly ) : void

Method Details

AGATAudioFile() protected méthode

protected AGATAudioFile ( ) : System
Résultat System

AGATAudioFile() protected méthode

protected AGATAudioFile ( string path ) : System
path string
Résultat System

Dispose() public méthode

Releases all resource used by the GATAsyncWavWriter object.
Call Dispose when you are finished using the GATAsyncWavWriter. The Dispose method leaves the GATAsyncWavWriter in an unusable state. After calling Dispose, you must release all references to the GATAsyncWavWriter so the garbage collector can reclaim the memory that the GATAsyncWavWriter was occupying.
public Dispose ( ) : void
Résultat void

FreeResources() protected abstract méthode

protected abstract FreeResources ( ) : void
Résultat void

OpenAudioFileAtPath() public static méthode

Creates and returns a ready to use AGATAudioFile object. Wrap in a try catch block if you are not sure that the file type is supported.
public static OpenAudioFileAtPath ( string path ) : AGATAudioFile
path string
Résultat AGATAudioFile

OpenAudioFileFromStream() public static méthode

Creates and returns a ready to use AGATAudioFile object. Wrap in a try catch block if you are not sure that the file type is supported.
public static OpenAudioFileFromStream ( Stream stream, string format ) : AGATAudioFile
stream Stream
format string
Résultat AGATAudioFile

ReadNextChunk() public abstract méthode

Reads the next chunk into the target array at offset. Multichannel data is always interleaved.
public abstract ReadNextChunk ( float target, int offset, int numFrames ) : int
target float
offset int
numFrames int
Résultat int

Property Details

_readChunkSize protected_oe property

protected int _readChunkSize
Résultat int

filePath public_oe property

The file path.
public string filePath
Résultat string