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

#include <adpcm_intern.h>

Inheritance diagram for Audio::MS_ADPCMStream:
Collaboration diagram for Audio::MS_ADPCMStream:

List of all members.

Classes

struct  ADPCMChannelStatus

Public Member Functions

 MS_ADPCMStream (Common::SeekableReadStream *stream, DisposeAfterUse::Flag disposeAfterUse, uint32 size, int rate, int channels, uint32 blockAlign)
virtual 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.
virtual int readBuffer (int16 *buffer, const int numSamples)
 Fill the given buffer with up to numSamples samples.

Protected Member Functions

void reset ()
int16 decodeMS (ADPCMChannelStatus *c, byte)

Protected Attributes

struct {
   ADPCMChannelStatus   ch [2]
_status

Private Attributes

uint8 _decodedSampleCount
uint8 _decodedSampleIndex
int16 _decodedSamples [4]

Detailed Description

Definition at line 184 of file adpcm_intern.h.


Constructor & Destructor Documentation

Audio::MS_ADPCMStream::MS_ADPCMStream ( Common::SeekableReadStream stream,
DisposeAfterUse::Flag  disposeAfterUse,
uint32  size,
int  rate,
int  channels,
uint32  blockAlign 
) [inline]

Definition at line 206 of file adpcm_intern.h.


Member Function Documentation

int16 Audio::MS_ADPCMStream::decodeMS ( ADPCMChannelStatus c,
byte  code 
) [protected]

Definition at line 271 of file adpcm.cpp.

virtual bool Audio::MS_ADPCMStream::endOfData (  )  const [inline, 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.

Reimplemented from Audio::ADPCMStream.

Definition at line 215 of file adpcm_intern.h.

int Audio::MS_ADPCMStream::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 289 of file adpcm.cpp.

void Audio::MS_ADPCMStream::reset (  )  [inline, protected, virtual]

Reimplemented from Audio::ADPCMStream.

Definition at line 200 of file adpcm_intern.h.


Member Data Documentation

Definition at line 223 of file adpcm_intern.h.

Definition at line 224 of file adpcm_intern.h.

Definition at line 225 of file adpcm_intern.h.

struct { ... } Audio::MS_ADPCMStream::_status [protected]

Reimplemented from Audio::ADPCMStream.


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


Generated on Sat Aug 17 2019 05:02:30 for ResidualVM by doxygen 1.7.1
curved edge   curved edge