class MAGES::Recorder::WaveCodec

Overview

A codec for Wave (.wav) files. More…

class WaveCodec: public MAGES::Recorder::ICodec
{
public:
    // structs

    struct Chunk;
    struct DataChunk;
    struct FmtChunk;
    struct WaveChunk;

    // properties

    string Name;
    string[] Extensions;
    int Priority;

    // methods

    static uint ASCIIToUInt32(string str);

    IEncoder CreateEncoder(
        BinaryWriter writer,
        int sampleRate,
        int channels,
        PCM.Format format,
        Dictionary options = null
    );

    IDecoder CreateDecoder(
        BinaryReader reader,
        Dictionary options = null
    );
};

Inherited Members

public:
    // properties

    string Name;
    string[] Extensions;
    int Priority;

    // methods

    IEncoder CreateEncoder(
        BinaryWriter writer,
        int sampleRate,
        int channels,
        PCM.Format format,
        Dictionary options = null
    );

    IDecoder CreateDecoder(
        BinaryReader reader,
        Dictionary options = null
    );

Detailed Documentation

A codec for Wave (.wav) files.

Properties

string Name

Gets the name of the library implementing a codec.

string[] Extensions

Gets the file extensions supported by the codec.

int Priority

Gets the priority of the codec.

Methods

static uint ASCIIToUInt32(string str)

Converts 4 ASCII characters to a uint32.

Parameters:

str

The string to convert.

Returns:

The converted value.

IEncoder CreateEncoder(
    BinaryWriter writer,
    int sampleRate,
    int channels,
    PCM.Format format,
    Dictionary options = null
)

Creates an encoder for the codec.

Parameters:

writer

The writer to write the encoded data to.

sampleRate

Sample rate of the input data.

channels

Number of channels used.

format

Format of the input data.

options

Options for the encoder.

Returns:

An encoder interface for this audio codec.

IDecoder CreateDecoder(
    BinaryReader reader,
    Dictionary options = null
)

Creates a decoder for the codec.

Parameters:

reader

The reader to read the encoded data from.

options

Options for the decoder.

Returns:

A decoder interface for this audio codec.