aboutsummaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
Diffstat (limited to 'audio')
-rw-r--r--audio/audiostream.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/audio/audiostream.cpp b/audio/audiostream.cpp
index 54dcd9b05d..36f714b402 100644
--- a/audio/audiostream.cpp
+++ b/audio/audiostream.cpp
@@ -431,12 +431,14 @@ public:
return samplesRead;
}
- bool endOfData() const { return _parentStream->endOfData() || _samplesRead >= _totalSamples; }
+ bool endOfData() const { return _parentStream->endOfData() || reachedLimit(); }
+ bool endOfStream() const { return _parentStream->endOfStream() || reachedLimit(); }
bool isStereo() const { return _parentStream->isStereo(); }
int getRate() const { return _parentStream->getRate(); }
private:
int getChannels() const { return isStereo() ? 2 : 1; }
+ bool reachedLimit() const { return _samplesRead >= _totalSamples; }
AudioStream *_parentStream;
DisposeAfterUse::Flag _disposeAfterUse;