Search Results for

    Show / Hide Table of Contents

    Class OggVorbisDecoder

    Decodes .ogg audio data into raw PCM format.

    Inheritance
    AudioDecoder
    OggVorbisDecoder
    Inherited Members
    AudioDecoder::Convert(ReadStream* stream, AudioDataInfo& info, Array<byte>& result, uint32 offset = 0)
    AudioDecoder::~AudioDecoder()
    Assembly: FlaxEngine.dll
    File: Engine/Tools/AudioTool/OggVorbisDecoder.h
    Syntax
    public class OggVorbisDecoder : public AudioDecoder

    Constructors

    ~OggVorbisDecoder()

    Finalizes an instance of the OggVorbisDecoder class.

    Declaration
    public ~OggVorbisDecoder()

    OggVorbisDecoder()

    Initializes a new instance of the OggVorbisDecoder class.

    Declaration
    public OggVorbisDecoder()

    Fields

    ChannelCount

    Declaration
    public uint32 ChannelCount
    Field Value
    uint32

    Offset

    Declaration
    public uint32 Offset
    Field Value
    uint32

    OggVorbisFile

    Declaration
    public OggVorbis_File OggVorbisFile
    Field Value
    OggVorbis_File

    Stream

    Declaration
    public ReadStream* Stream
    Field Value
    ReadStream

    Methods

    IsValid(ReadStream* stream, uint32 offset = 0)

    Checks if the data in the provided stream valid audio data for the current format. You should check this before calling Open().

    Declaration
    public virtual bool IsValid(ReadStream* stream, uint32 offset = 0) override
    Parameters
    ReadStream stream

    The stream to check.

    uint32 offset

    The offset at which audio data in the stream begins, in bytes.

    Returns
    bool

    True if the data is valid, otherwise false.

    Overrides
    AudioDecoder::IsValid(ReadStream* stream, uint32 offset = 0)

    Open(ReadStream* stream, AudioDataInfo& info, uint32 offset = 0)

    Tries to open the specified stream with audio data. Must be called before any reads or seeks.

    Declaration
    public virtual bool Open(ReadStream* stream, AudioDataInfo& info, uint32 offset = 0) override
    Parameters
    ReadStream stream

    The data stream audio data is stored in. Must be valid until decoder usage end. Decoder may cache this pointer for the later usage.

    AudioDataInfo info

    The output information describing meta-data of the audio in the stream.

    uint32 offset

    The offset.

    Returns
    bool

    True if the data is invalid, otherwise false.

    Overrides
    AudioDecoder::Open(ReadStream* stream, AudioDataInfo& info, uint32 offset = 0)

    Read(byte* samples, uint32 numSamples)

    Reads a set of samples from the audio data.

    All values are returned as signed values.

    Declaration
    public virtual void Read(byte* samples, uint32 numSamples) override
    Parameters
    byte samples

    Pre-allocated buffer to store the samples in.

    uint32 numSamples

    The number of samples to read.

    Overrides
    AudioDecoder::Read(byte* samples, uint32 numSamples)

    Seek(uint32 offset)

    Moves the read pointer to the specified offset. Any further Read() calls will read from this location. User must ensure not to seek past the end of the data.

    Declaration
    public virtual void Seek(uint32 offset) override
    Parameters
    uint32 offset

    The offset to move the pointer in. In number of samples.

    Overrides
    AudioDecoder::Seek(uint32 offset)

    See Also

    AudioDecoder
    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat