aboutsummaryrefslogtreecommitdiff
path: root/audio/decoders/adpcm_intern.h
diff options
context:
space:
mode:
authorDreammaster2013-02-15 08:25:09 -0500
committerDreammaster2013-02-15 08:25:09 -0500
commitbb3285d933419b6bdefadc55a6e320855ff0dd27 (patch)
tree2df613c52f854c33cff660ed1b064e2996ed80bb /audio/decoders/adpcm_intern.h
parentd1a19a1d4c3e20b57250e73141d81e8d9b44a2a1 (diff)
parentadc338cd719179a94ff470b28e9584262d7b47e8 (diff)
downloadscummvm-rg350-bb3285d933419b6bdefadc55a6e320855ff0dd27.tar.gz
scummvm-rg350-bb3285d933419b6bdefadc55a6e320855ff0dd27.tar.bz2
scummvm-rg350-bb3285d933419b6bdefadc55a6e320855ff0dd27.zip
Merge branch 'master' into hopkins
Diffstat (limited to 'audio/decoders/adpcm_intern.h')
-rw-r--r--audio/decoders/adpcm_intern.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/audio/decoders/adpcm_intern.h b/audio/decoders/adpcm_intern.h
index 3b8d8c74d0..66a1aa605f 100644
--- a/audio/decoders/adpcm_intern.h
+++ b/audio/decoders/adpcm_intern.h
@@ -206,12 +206,19 @@ public:
if (blockAlign == 0)
error("MS_ADPCMStream(): blockAlign isn't specified for MS ADPCM");
memset(&_status, 0, sizeof(_status));
+ _decodedSampleCount = 0;
}
+ virtual bool endOfData() const { return (_stream->eos() || _stream->pos() >= _endpos) && (_decodedSampleCount == 0); }
+
virtual int readBuffer(int16 *buffer, const int numSamples);
protected:
int16 decodeMS(ADPCMChannelStatus *c, byte);
+
+private:
+ uint8 _decodedSampleCount;
+ int16 _decodedSamples[4];
};
// Duck DK3 IMA ADPCM Decoder