diff options
author | Fabio Battaglia | 2009-03-30 13:42:28 +0000 |
---|---|---|
committer | Fabio Battaglia | 2009-03-30 13:42:28 +0000 |
commit | 0c1bae6b15c941cd6d8e6dfb98c0e6ddf8c3eb4c (patch) | |
tree | dfbdbfde3324abf7fb0f1ac0e2ae0f2e4169b7b6 /sound/vag.h | |
parent | 4076bdecbce2a93e8254eb09cb01460ce693d906 (diff) | |
download | scummvm-rg350-0c1bae6b15c941cd6d8e6dfb98c0e6ddf8c3eb4c.tar.gz scummvm-rg350-0c1bae6b15c941cd6d8e6dfb98c0e6ddf8c3eb4c.tar.bz2 scummvm-rg350-0c1bae6b15c941cd6d8e6dfb98c0e6ddf8c3eb4c.zip |
Rate selection is now possible for VAG audio decoder, also decoder doesn't die with incomplete/corrupted files
svn-id: r39764
Diffstat (limited to 'sound/vag.h')
-rw-r--r-- | sound/vag.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/vag.h b/sound/vag.h index 2b3e35b35d..228f68279e 100644 --- a/sound/vag.h +++ b/sound/vag.h @@ -38,12 +38,12 @@ namespace Audio { class VagStream : public Audio::AudioStream { public: - VagStream(Common::SeekableReadStream *stream, bool loop = false); + VagStream(Common::SeekableReadStream *stream, bool loop = false, int rate = 11025); ~VagStream(); bool isStereo() const { return false; } bool endOfData() const { return _stream->pos() == _stream->size(); } - int getRate() const { return 11025; } + int getRate() const { return _rate; } int readBuffer(int16 *buffer, const int numSamples); void rewind(); @@ -54,6 +54,7 @@ private: byte _predictor; double _samples[28]; byte _samplesRemaining; + int _rate; double _s1, _s2; }; |