diff options
Diffstat (limited to '')
-rw-r--r-- | src/output/Internal.hxx | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/src/output/Internal.hxx b/src/output/Internal.hxx index fe7452f17..a443d0642 100644 --- a/src/output/Internal.hxx +++ b/src/output/Internal.hxx @@ -368,6 +368,51 @@ struct AudioOutput { * Set the "allow_play" and signal the thread. */ void LockAllowPlay(); + +private: + void CommandFinished(); + + bool Enable(); + void Disable(); + + void Open(); + void Close(bool drain); + void Reopen(); + + AudioFormat OpenFilter(AudioFormat &format, Error &error_r); + void CloseFilter(); + void ReopenFilter(); + + /** + * Wait until the output's delay reaches zero. + * + * @return true if playback should be continued, false if a + * command was issued + */ + bool WaitForDelay(); + + gcc_pure + const music_chunk *GetNextChunk() const; + + bool PlayChunk(const music_chunk *chunk); + + /** + * Plays all remaining chunks, until the tail of the pipe has + * been reached (and no more chunks are queued), or until a + * command is received. + * + * @return true if at least one chunk has been available, + * false if the tail of the pipe was already reached + */ + bool Play(); + + void Pause(); + + /** + * The OutputThread. + */ + void Task(); + static void Task(void *arg); }; /** |