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

#include <adpcm_intern.h>

Inheritance diagram for Audio::ADPCMStream:
Collaboration diagram for Audio::ADPCMStream:

List of all members.

Classes

struct  ADPCMStatus

Public Member Functions

 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 bool isStereo () const
 Is this a stereo stream?
virtual int getRate () const
 Sample rate of the stream.
virtual bool rewind ()
 Rewinds the stream to its start.
virtual bool seek (const Timestamp &where)
 Seeks to a given offset in the stream.
virtual Timestamp getLength () const
 Returns the length of the stream.

Static Public Attributes

static const int16 _stepAdjustTable [16]
 This table is used by some ADPCM variants (IMA and OKI) to adjust the step for use on the next sample.

Protected Member Functions

virtual void reset ()

Protected Attributes

Common::DisposablePtr
< Common::SeekableReadStream
_stream
int32 _startpos
const int32 _endpos
const int _channels
const uint32 _blockAlign
uint32 _blockPos [2]
const int _rate
struct
Audio::ADPCMStream::ADPCMStatus 
_status

Detailed Description

Definition at line 42 of file adpcm_intern.h.


Constructor & Destructor Documentation

Audio::ADPCMStream::ADPCMStream ( Common::SeekableReadStream stream,
DisposeAfterUse::Flag  disposeAfterUse,
uint32  size,
int  rate,
int  channels,
uint32  blockAlign 
)

Definition at line 43 of file adpcm.cpp.


Member Function Documentation

virtual bool Audio::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.

Implements Audio::AudioStream.

Reimplemented in Audio::Oki_ADPCMStream, Audio::DVI_ADPCMStream, and Audio::MS_ADPCMStream.

Definition at line 65 of file adpcm_intern.h.

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

Returns the length of the stream.

Returns:
length as Timestamp.

Implements Audio::SeekableAudioStream.

Definition at line 71 of file adpcm_intern.h.

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

Sample rate of the stream.

Implements Audio::AudioStream.

Definition at line 67 of file adpcm_intern.h.

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

Is this a stereo stream?

Implements Audio::AudioStream.

Definition at line 66 of file adpcm_intern.h.

void Audio::ADPCMStream::reset (  )  [protected, virtual]

Reimplemented in Audio::Apple_ADPCMStream, Audio::MSIma_ADPCMStream, and Audio::MS_ADPCMStream.

Definition at line 54 of file adpcm.cpp.

bool Audio::ADPCMStream::rewind (  )  [virtual]

Rewinds the stream to its start.

Returns:
true on success, false otherwise.

Reimplemented from Audio::SeekableAudioStream.

Definition at line 59 of file adpcm.cpp.

virtual bool Audio::ADPCMStream::seek ( const Timestamp where  )  [inline, virtual]

Seeks to a given offset in the stream.

Parameters:
where offset as timestamp
Returns:
true on success, false on failure.

Implements Audio::SeekableAudioStream.

Definition at line 70 of file adpcm_intern.h.


Member Data Documentation

Definition at line 48 of file adpcm_intern.h.

Definition at line 49 of file adpcm_intern.h.

const int Audio::ADPCMStream::_channels [protected]

Definition at line 47 of file adpcm_intern.h.

Definition at line 46 of file adpcm_intern.h.

const int Audio::ADPCMStream::_rate [protected]

Definition at line 50 of file adpcm_intern.h.

Definition at line 45 of file adpcm_intern.h.

Initial value:
 {
    -1, -1, -1, -1, 2, 4, 6, 8,
    -1, -1, -1, -1, 2, 4, 6, 8
}

This table is used by some ADPCM variants (IMA and OKI) to adjust the step for use on the next sample.

The first 8 entries are identical to the second 8 entries. Hence, we could half the table in size. But since the lookup index is always a 4-bit nibble, it is more efficient to just keep it as it is.

Definition at line 80 of file adpcm_intern.h.


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


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