Skip to content

Commit

Permalink
SOUND: Add an isFinished() function to QueuingAudioStream
Browse files Browse the repository at this point in the history
  • Loading branch information
clone2727 authored and DrMcCoy committed Aug 18, 2018
1 parent a0131cb commit c6287dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/sound/audiostream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,11 @@ class QueuingAudioStreamImpl : public QueuingAudioStream {
_finished = true;
}

virtual bool isFinished() const {
Common::StackLock lock(_mutex);
return _finished;
}

size_t numQueuedStreams() const {
Common::StackLock lock(_mutex);
return _queue.size();
Expand Down
5 changes: 5 additions & 0 deletions src/sound/audiostream.h
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,11 @@ class QueuingAudioStream : public AudioStream {
*/
virtual void finish() = 0;

/**
* Is the stream marked as finished?
*/
virtual bool isFinished() const = 0;

/**
* Return the number of streams still queued for playback (including
* the currently playing stream).
Expand Down

0 comments on commit c6287dc

Please sign in to comment.