diff options
author | Johannes Schickel | 2010-01-07 17:04:01 +0000 |
---|---|---|
committer | Johannes Schickel | 2010-01-07 17:04:01 +0000 |
commit | a597e5fef93523436e60eca18997fb5ca5196345 (patch) | |
tree | 673cc525c81033c28ccbc4e5a7163f00e941f59b /sound/vag.cpp | |
parent | 771867fd1bd96470d788644072f4f6ad8beca640 (diff) | |
download | scummvm-rg350-a597e5fef93523436e60eca18997fb5ca5196345.tar.gz scummvm-rg350-a597e5fef93523436e60eca18997fb5ca5196345.tar.bz2 scummvm-rg350-a597e5fef93523436e60eca18997fb5ca5196345.zip |
Make VagStream a RewindableAudioStream.
svn-id: r47132
Diffstat (limited to 'sound/vag.cpp')
-rw-r--r-- | sound/vag.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/vag.cpp b/sound/vag.cpp index 483ac36bb8..c4ff55efa2 100644 --- a/sound/vag.cpp +++ b/sound/vag.cpp @@ -27,11 +27,10 @@ namespace Audio { -VagStream::VagStream(Common::SeekableReadStream *stream, bool loop, int rate) : _stream(stream) { +VagStream::VagStream(Common::SeekableReadStream *stream, int rate) : _stream(stream) { _samplesRemaining = 0; _predictor = 0; _s1 = _s2 = 0.0; - _loop = loop; _rate = rate; } @@ -109,17 +108,16 @@ int VagStream::readBuffer(int16 *buffer, const int numSamples) { _samplesRemaining = 28 - i; } - if (_loop && _stream->eos()) - rewind(); - return samplesDecoded; } -void VagStream::rewind() { +bool VagStream::rewind() { _stream->seek(0); _samplesRemaining = 0; _predictor = 0; _s1 = _s2 = 0.0; + + return true; } } |