From 933fcf42326972c93dfa840ef06e2639e16cc43d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 25 Mar 2009 18:00:31 +0100 Subject: output_all: moved code to audio_output_all_wait() Synchronization with the output thread will be implemented in output_all.c, not in player_thread.c. Currently, that's just a simple g_usleep(1ms). --- src/output_all.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/output_all.h') diff --git a/src/output_all.h b/src/output_all.h index 197a0bfd..2a09514b 100644 --- a/src/output_all.h +++ b/src/output_all.h @@ -104,6 +104,17 @@ audio_output_all_play(struct music_chunk *chunk); unsigned audio_output_all_check(void); +/** + * Checks if the size of the #music_pipe is below the #threshold. If + * not, it attempts to synchronize with all output threads, and waits + * until another #music_chunk is finished. + * + * @param threshold the maximum number of chunks in the pipe + * @return true if there are less than #threshold chunks in the pipe + */ +bool +audio_output_all_wait(unsigned threshold); + /** * Puts all audio outputs into pause mode. Most implementations will * simply close it then. -- cgit v1.2.3