diff options
author | Max Horn | 2003-12-19 01:30:19 +0000 |
---|---|---|
committer | Max Horn | 2003-12-19 01:30:19 +0000 |
commit | d8903123b0bd4265de03f40eaaf6bb1d2b160c3f (patch) | |
tree | d1f0841228acacd932f41dbdd3b249a6fc5e97af /sword2 | |
parent | 0cddca5f43c5b85d28f2977d783a6cd5cec0d540 (diff) | |
download | scummvm-rg350-d8903123b0bd4265de03f40eaaf6bb1d2b160c3f.tar.gz scummvm-rg350-d8903123b0bd4265de03f40eaaf6bb1d2b160c3f.tar.bz2 scummvm-rg350-d8903123b0bd4265de03f40eaaf6bb1d2b160c3f.zip |
distinguish between end of stream and end of data
svn-id: r11756
Diffstat (limited to 'sword2')
-rw-r--r-- | sword2/driver/d_sound.cpp | 2 | ||||
-rw-r--r-- | sword2/driver/d_sound.h | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/sword2/driver/d_sound.cpp b/sword2/driver/d_sound.cpp index 303fcb5893..696c85a36b 100644 --- a/sword2/driver/d_sound.cpp +++ b/sword2/driver/d_sound.cpp @@ -105,7 +105,7 @@ int16 MusicHandle::read() { return out; } -bool MusicHandle::eos() const { +bool MusicHandle::endOfData() const { return (!_streaming || _filePos >= _fileEnd); } diff --git a/sword2/driver/d_sound.h b/sword2/driver/d_sound.h index b36e402002..a62054853d 100644 --- a/sword2/driver/d_sound.h +++ b/sword2/driver/d_sound.h @@ -61,14 +61,16 @@ public: virtual int readBuffer(int16 *buffer, const int numSamples) { int samples; - for (samples = 0; samples < numSamples && !eos(); samples++) { + for (samples = 0; samples < numSamples && !endOfData(); samples++) { *buffer++ = read(); } return samples; } int16 read(); - bool eos() const; + bool endOfData() const; + // This stream never 'ends' + bool endOfStream() const { return false; } MusicHandle() : _firstTime(false), _streaming(false), _paused(false), _looping(false), |