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 |
virtual bool | isStereo () const |
virtual int | getRate () const |
virtual bool | rewind () |
virtual bool | seek (const Timestamp &where) |
virtual Timestamp | getLength () const |
Public Member Functions inherited from Audio::SeekableAudioStream | |
bool | seek (uint32 where) |
Public Member Functions inherited from Audio::AudioStream | |
virtual int | readBuffer (int16 *buffer, const int numSamples)=0 |
virtual bool | endOfStream () const |
Static Public Attributes | |
static const int16 | _stepAdjustTable [16] |
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 |
Additional Inherited Members | |
Static Public Member Functions inherited from Audio::SeekableAudioStream | |
static SeekableAudioStream * | openStreamFile (const Common::Path &basename) |
|
inlinevirtual |
Check whether end of data has been reached.
If this returns true, it indicates that at this time there is no data available in the stream. However, there might be more data in the future.
This is used by e.g. a rate converter to decide whether to keep on converting data or to stop.
Implements Audio::AudioStream.
Reimplemented in Audio::MS_ADPCMStream, Audio::DVI_ADPCMStream, Audio::XA_ADPCMStream, and Audio::Oki_ADPCMStream.
|
inlinevirtual |
Check whether this is a stereo stream.
Implements Audio::AudioStream.
|
inlinevirtual |
Sample rate of the stream.
Implements Audio::AudioStream.
|
virtual |
Rewind the stream to its start.
Reimplemented from Audio::SeekableAudioStream.
|
inlinevirtual |
Seek to a given offset in the stream.
where | Offset as a timestamp. |
Implements Audio::SeekableAudioStream.
|
inlinevirtual |
Return the length of the stream.
Implements Audio::SeekableAudioStream.
|
static |
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.