ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge
Inheritance diagram for Audio::MP3Stream:
Collaboration diagram for Audio::MP3Stream:

List of all members.

Public Member Functions

 MP3Stream (Common::SeekableReadStream *inStream, DisposeAfterUse::Flag dispose)
int readBuffer (int16 *buffer, const int numSamples)
 Fill the given buffer with up to numSamples samples.
bool seek (const Timestamp &where)
 Seeks to a given offset in the stream.
Timestamp getLength () const
 Returns the length of the stream.

Protected Attributes

< Common::SeekableReadStream
Timestamp _length

Static Private Member Functions

static Common::SeekableReadStreamskipID3 (Common::SeekableReadStream *stream, DisposeAfterUse::Flag dispose)

Detailed Description

Definition at line 96 of file mp3.cpp.

Constructor & Destructor Documentation

Audio::MP3Stream::MP3Stream ( Common::SeekableReadStream inStream,
DisposeAfterUse::Flag  dispose 

Definition at line 329 of file mp3.cpp.

Member Function Documentation

Timestamp Audio::MP3Stream::getLength (  )  const [inline, virtual]

Returns the length of the stream.

length as Timestamp.

Implements Audio::SeekableAudioStream.

Definition at line 103 of file mp3.cpp.

int Audio::MP3Stream::readBuffer ( int16 buffer,
const int  numSamples 
) [virtual]

Fill the given buffer with up to numSamples samples.

Returns the actual number of samples read, or -1 if a critical error occurred (note: you *must* check if this value is less than what you requested, this can happen when the stream is fully used up).

Data has to be in native endianess, 16 bit per sample, signed. For stereo stream, buffer will be filled with interleaved left and right channel samples, starting with a left sample. Furthermore, the samples in the left and right are summed up. So if you request 4 samples from a stereo stream, you will get a total of two left channel and two right channel samples.

Implements Audio::AudioStream.

Definition at line 363 of file mp3.cpp.

bool Audio::MP3Stream::seek ( const Timestamp where  )  [virtual]

Seeks to a given offset in the stream.

where offset as timestamp
true on success, false on failure.

Implements Audio::SeekableAudioStream.

Definition at line 367 of file mp3.cpp.

Common::SeekableReadStream * Audio::MP3Stream::skipID3 ( Common::SeekableReadStream stream,
DisposeAfterUse::Flag  dispose 
) [static, private]

Definition at line 393 of file mp3.cpp.

Member Data Documentation

Definition at line 108 of file mp3.cpp.

The documentation for this class was generated from the following file:

Generated on Sat Aug 8 2020 05:03:03 for ResidualVM by doxygen 1.7.1
curved edge   curved edge