output/Multiple: make chunk_is_consumed_in() an AudioOutput method

This commit is contained in:
Max Kellermann
2016-12-11 21:59:28 +01:00
parent 57dd344f3b
commit dc05dd7ca1
4 changed files with 62 additions and 30 deletions

View File

@@ -394,6 +394,20 @@ public:
*/
void LockAllowPlay();
/**
* Did we already consumed this chunk?
*
* Caller must lock the mutex.
*/
gcc_pure
bool IsChunkConsumed(const MusicChunk &chunk) const;
gcc_pure
bool LockIsChunkConsumed(const MusicChunk &chunk) {
const ScopeLock protect(mutex);
return IsChunkConsumed(chunk);
}
private:
void CommandFinished();