xoreos
0.0.5
|
Public Member Functions | |
ADPCMStream (Common::SeekableReadStream *stream, bool disposeAfterUse, size_t size, int rate, int channels, uint32 blockAlign) | |
~ADPCMStream () | |
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. More... | |
virtual int | getChannels () const |
Return the number channels in this stream. More... | |
virtual int | getRate () const |
Sample rate of the stream. More... | |
virtual uint64 | getLength () const |
Estimate the total number of samples per channel in this stream. More... | |
virtual bool | rewind () |
Rewinds the stream to its start. More... | |
Public Member Functions inherited from Sound::RewindableAudioStream | |
virtual uint64 | getDuration () const |
Estimate the total duration of the stream in milliseconds. More... | |
Public Member Functions inherited from Sound::AudioStream | |
virtual | ~AudioStream () |
virtual size_t | readBuffer (int16 *buffer, const size_t numSamples)=0 |
Fill the given buffer with up to numSamples samples. More... | |
virtual bool | endOfStream () const |
End of stream reached? If this returns true, it means that all data in this stream is used up and no additional data will appear in it in the future. More... | |
Protected Member Functions | |
virtual void | reset () |
int16 | stepAdjust (byte) |
Protected Attributes | |
Common::DisposablePtr< Common::SeekableReadStream > | _stream |
const size_t | _size |
const size_t | _startpos |
const size_t | _endpos |
const int | _channels |
const uint32 | _blockAlign |
uint32 | _blockPos [2] |
const int | _rate |
uint64 | _length |
struct { | |
struct { | |
int32 last | |
int32 stepIndex | |
} ima_ch [2] | |
} | _status |
Additional Inherited Members | |
Static Public Attributes inherited from Sound::RewindableAudioStream | |
static const uint64 | kInvalidLength = UINT64_C(0xFFFFFFFFFFFFFFFF) |
Static Public Attributes inherited from Sound::AudioStream | |
static const size_t | kSizeInvalid = SIZE_MAX |
Sound::ADPCMStream::ADPCMStream | ( | Common::SeekableReadStream * | stream, |
bool | disposeAfterUse, | ||
size_t | size, | ||
int | rate, | ||
int | channels, | ||
uint32 | blockAlign | ||
) |
|
inlinevirtual |
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 Sound::AudioStream.
|
inlinevirtual |
Return the number channels in this stream.
Implements Sound::AudioStream.
Definition at line 90 of file adpcm.cpp.
References _channels.
|
inlinevirtual |
Estimate the total number of samples per channel in this stream.
If this value is not calculatable, return kInvalidLength.
Reimplemented from Sound::RewindableAudioStream.
Definition at line 92 of file adpcm.cpp.
References _length.
|
inlinevirtual |
Sample rate of the stream.
Implements Sound::AudioStream.
Definition at line 91 of file adpcm.cpp.
References _rate.
|
protectedvirtual |
Reimplemented in Sound::Xbox_ADPCMStream, Sound::MS_ADPCMStream, Sound::MSIma_ADPCMStream, and Sound::Apple_ADPCMStream.
Definition at line 120 of file adpcm.cpp.
References _blockAlign, _blockPos, and _status.
Referenced by ADPCMStream(), Sound::Apple_ADPCMStream::reset(), Sound::MSIma_ADPCMStream::reset(), Sound::MS_ADPCMStream::reset(), Sound::Xbox_ADPCMStream::reset(), and rewind().
|
virtual |
Definition at line 445 of file adpcm.cpp.
Referenced by Sound::Ima_ADPCMStream::decodeIMA().
|
protected |
Definition at line 68 of file adpcm.cpp.
Referenced by Sound::Apple_ADPCMStream::Apple_ADPCMStream(), Sound::MS_ADPCMStream::MS_ADPCMStream(), Sound::MSIma_ADPCMStream::MSIma_ADPCMStream(), Sound::Apple_ADPCMStream::readBuffer(), Sound::MSIma_ADPCMStream::readBuffer(), Sound::MS_ADPCMStream::readBuffer(), Sound::Xbox_ADPCMStream::readBuffer(), reset(), Sound::Apple_ADPCMStream::reset(), Sound::Xbox_ADPCMStream::reset(), and Sound::Xbox_ADPCMStream::Xbox_ADPCMStream().
|
protected |
Definition at line 69 of file adpcm.cpp.
Referenced by Sound::Apple_ADPCMStream::readBuffer(), Sound::MSIma_ADPCMStream::readBuffer(), Sound::MS_ADPCMStream::readBuffer(), Sound::Xbox_ADPCMStream::readBuffer(), reset(), and Sound::Xbox_ADPCMStream::reset().
|
protected |
Definition at line 67 of file adpcm.cpp.
Referenced by getChannels(), Sound::Ima_ADPCMStream::Ima_ADPCMStream(), Sound::MSIma_ADPCMStream::MSIma_ADPCMStream(), Sound::Ima_ADPCMStream::readBuffer(), Sound::Apple_ADPCMStream::readBuffer(), Sound::MSIma_ADPCMStream::readBuffer(), Sound::MS_ADPCMStream::readBuffer(), and Sound::Xbox_ADPCMStream::readBuffer().
|
protected |
Definition at line 66 of file adpcm.cpp.
Referenced by endOfData(), Sound::Ima_ADPCMStream::readBuffer(), Sound::Apple_ADPCMStream::readBuffer(), Sound::MSIma_ADPCMStream::readBuffer(), Sound::MS_ADPCMStream::readBuffer(), and Sound::Xbox_ADPCMStream::readBuffer().
|
protected |
Definition at line 72 of file adpcm.cpp.
Referenced by Sound::Apple_ADPCMStream::Apple_ADPCMStream(), getLength(), Sound::Ima_ADPCMStream::Ima_ADPCMStream(), Sound::MS_ADPCMStream::MS_ADPCMStream(), Sound::MSIma_ADPCMStream::MSIma_ADPCMStream(), and Sound::Xbox_ADPCMStream::Xbox_ADPCMStream().
|
protected |
|
protected |
Definition at line 64 of file adpcm.cpp.
Referenced by Sound::Apple_ADPCMStream::Apple_ADPCMStream(), Sound::Ima_ADPCMStream::Ima_ADPCMStream(), Sound::MS_ADPCMStream::MS_ADPCMStream(), Sound::MSIma_ADPCMStream::MSIma_ADPCMStream(), and Sound::Xbox_ADPCMStream::Xbox_ADPCMStream().
|
protected |
struct { ... } Sound::ADPCMStream::_status |
|
protected |
Definition at line 63 of file adpcm.cpp.
Referenced by endOfData(), Sound::Ima_ADPCMStream::readBuffer(), Sound::Apple_ADPCMStream::readBuffer(), Sound::MSIma_ADPCMStream::readBuffer(), Sound::MS_ADPCMStream::readBuffer(), Sound::Xbox_ADPCMStream::readBuffer(), and rewind().
struct { ... } Sound::ADPCMStream::ima_ch[2] |