C# Класс 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!
Наследование: IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
filePath string

Защищенные свойства (Protected)

Свойство Тип Описание
_readChunkSize int

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
AGATAudioFile ( ) : System
AGATAudioFile ( string path ) : System
FreeResources ( ) : void

Приватные методы

Метод Описание
Dispose ( bool explicitly ) : void

Описание методов

AGATAudioFile() защищенный Метод

protected AGATAudioFile ( ) : System
Результат System

AGATAudioFile() защищенный Метод

protected AGATAudioFile ( string path ) : System
path string
Результат System

Dispose() публичный Метод

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
Результат void

FreeResources() защищенный абстрактный Метод

protected abstract FreeResources ( ) : void
Результат void

OpenAudioFileAtPath() публичный статический Метод

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
Результат AGATAudioFile

OpenAudioFileFromStream() публичный статический Метод

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
Результат AGATAudioFile

ReadNextChunk() публичный абстрактный Метод

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
Результат int

Описание свойств

_readChunkSize защищенное свойство

protected int _readChunkSize
Результат int

filePath публичное свойство

The file path.
public string filePath
Результат string