SFXStream

Engine/source/sfx/sfxStream.h

The base sound data streaming interface.

More...

Public Types

Parent 

Public Functions

Destructor.

Make a copy of this stream with its own private state, so new independent read() operations can be issued on the same data stream.

The data size in bytes of the decompressed PCM data.

The length of the sound in milliseconds.

The format of the data in the stream.

The number of samples in the data stream.

bool

Returns true if we've reached the end of the stream.

read(U8 * buffer, U32 length)

Reads data from the stream and decompresses it into PCM samples.

Resets the stream to restart reading data from the begining.

Detailed Description

The base sound data streaming interface.

note:

Streams that support seeking should implement the IPositionable interface.

note:

Since SFXStreams are byte streams, all offset/size information is in bytes and not in number of samples.

Public Types

typedef void Parent 

Public Functions

~SFXStream()

Destructor.

clone()

Make a copy of this stream with its own private state, so new independent read() operations can be issued on the same data stream.

return:

Returns a copy of the stream or NULL.

Reimplemented by: SFXWavStream

getDataLength()

The data size in bytes of the decompressed PCM data.

Reimplemented by: SFXFileStream, SFXMemoryStream

getDuration()

The length of the sound in milliseconds.

Reimplemented by: SFXFileStream, SFXMemoryStream

getFormat()

The format of the data in the stream.

Reimplemented by: SFXFileStream, SFXMemoryStream

getSampleCount()

The number of samples in the data stream.

Reimplemented by: SFXFileStream, SFXMemoryStream

isEOS()

Returns true if we've reached the end of the stream.

Reimplemented by: SFXFileStream, SFXMemoryStream

read(U8 * buffer, U32 length)

Reimplemented from: IInputStream

Reimplemented by: SFXWavStream, SFXMemoryStream

reset()

Reimplemented from: IResettable

Reimplemented by: SFXWavStream, SFXMemoryStream