SFXMemoryStream
Engine/source/sfx/sfxMemoryStream.h
A stream filter that converts sample packets from its source stream to a continuous sample stream.
Public Types
Parent
Protected Attributes
RawData *
The current sample data packet.
Read offset in the current sample data packet.
Number of samples left to be read from stream.
Total number of samples in the stream.
Public Functions
SFXMemoryStream(const SFXFormat & format, SourceStreamType * stream, U32 numSamples)
The data size in bytes of the decompressed PCM data.
The length of the sound in milliseconds.
The number of samples in the data stream.
bool
isEOS()
Returns true if we've reached the end of the stream.
Detailed Description
A stream filter that converts sample packets from its source stream to a continuous sample stream.
Useful for feeding sound from a source that pushes sample data in discrete packets.
note:For the SFXMemoryStream to allow a reset(), the source input stream must implement IResettable.
Public Types
typedef SFXStream Parent
Protected Attributes
RawData * mCurrentPacket
The current sample data packet.
U32 mCurrentPacketOffset
Read offset in the current sample data packet.
SFXFormat mFormat
U32 mNumSamplesLeft
Number of samples left to be read from stream.
Locked to U32_MAX for stream of indefinite size.
U32 mNumSamplesTotal
Total number of samples in the stream.
If this is U32_MAX, the stream is considered to be of indefinite size.
Public Functions
SFXMemoryStream(const SFXFormat & format, SourceStreamType * stream, U32 numSamples)
getDataLength()
Reimplemented from: SFXStream
getDuration()
Reimplemented from: SFXStream
getFormat()
Reimplemented from: SFXStream
getSampleCount()
Reimplemented from: SFXStream
isEOS()
Reimplemented from: SFXStream
read(U8 * buffer, U32 length)
Reimplemented from: SFXStream
reset()
Reimplemented from: SFXStream