ResidualVM logo ResidualVM website - Forums - Contact us BuildBot - Doxygen - Wiki curved edge

#include <3do.h>

Inheritance diagram for Audio::Audio3DO_ADP4_Stream:
Collaboration diagram for Audio::Audio3DO_ADP4_Stream:

List of all members.

Public Member Functions

 Audio3DO_ADP4_Stream (Common::SeekableReadStream *stream, uint16 sampleRate, bool stereo, DisposeAfterUse::Flag disposeAfterUse, audio_3DO_ADP4_PersistentSpace *persistentSpace)

Protected Member Functions

void reset ()
bool rewind ()
 Rewinds the stream to its start.
bool endOfData () const
 End of data reached? If this returns true, it means that at this time there is no data available in the stream.
bool isStereo () const
 Is this a stereo stream?
int getRate () const
 Sample rate of the stream.
int readBuffer (int16 *buffer, const int numSamples)
 Fill the given buffer with up to numSamples samples.

Protected Attributes

const uint16 _sampleRate
const bool _stereo
Common::DisposablePtr
< Common::SeekableReadStream
_stream
int32 _streamBytesLeft
bool _initialRead
audio_3DO_ADP4_PersistentSpace_callerDecoderData
audio_3DO_ADP4_PersistentSpace _initialDecoderData
audio_3DO_ADP4_PersistentSpace _curDecoderData

Private Member Functions

int16 decodeSample (byte compressedNibble)

Detailed Description

Definition at line 54 of file 3do.h.


Constructor & Destructor Documentation

Audio::Audio3DO_ADP4_Stream::Audio3DO_ADP4_Stream ( Common::SeekableReadStream stream,
uint16  sampleRate,
bool  stereo,
DisposeAfterUse::Flag  disposeAfterUse,
audio_3DO_ADP4_PersistentSpace persistentSpace 
)

Definition at line 54 of file 3do.cpp.


Member Function Documentation

int16 Audio::Audio3DO_ADP4_Stream::decodeSample ( byte  compressedNibble  )  [private]

Definition at line 76 of file 3do.cpp.

bool Audio::Audio3DO_ADP4_Stream::endOfData (  )  const [inline, protected, virtual]

End of data reached? If this returns true, it means that at this time there is no data available in the stream.

However there may be more data in the future. This is used by e.g. a rate converter to decide whether to keep on converting data or stop.

Implements Audio::AudioStream.

Definition at line 67 of file 3do.h.

int Audio::Audio3DO_ADP4_Stream::getRate (  )  const [inline, protected, virtual]

Sample rate of the stream.

Implements Audio::AudioStream.

Definition at line 69 of file 3do.h.

bool Audio::Audio3DO_ADP4_Stream::isStereo (  )  const [inline, protected, virtual]

Is this a stereo stream?

Implements Audio::AudioStream.

Definition at line 68 of file 3do.h.

int Audio::Audio3DO_ADP4_Stream::readBuffer ( int16 buffer,
const int  numSamples 
) [protected, 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 105 of file 3do.cpp.

void Audio::Audio3DO_ADP4_Stream::reset (  )  [protected]

Definition at line 65 of file 3do.cpp.

bool Audio::Audio3DO_ADP4_Stream::rewind (  )  [protected, virtual]

Rewinds the stream to its start.

Returns:
true on success, false otherwise.

Implements Audio::RewindableAudioStream.

Definition at line 71 of file 3do.cpp.


Member Data Documentation

Definition at line 73 of file 3do.h.

Definition at line 59 of file 3do.h.

const bool Audio::Audio3DO_ADP4_Stream::_stereo [protected]

Definition at line 60 of file 3do.h.

Definition at line 63 of file 3do.h.


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


Generated on Sat Jan 12 2019 05:03:52 for ResidualVM by doxygen 1.7.1
curved edge   curved edge