From c13e8b5146993999a87373a98b5a3da4b6cf599a Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 29 Sep 2008 16:40:07 +0200 Subject: audio_output: added function audio_output_is_pending() The function audio_output_is_pending() returns whether there is a pending command. This is useful for output plugins as a break condition for longer loops. --- src/output_api.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/output_api.c') diff --git a/src/output_api.c b/src/output_api.c index c8225579d..e9216a2ef 100644 --- a/src/output_api.c +++ b/src/output_api.c @@ -31,3 +31,7 @@ void audio_output_closed(struct audio_output *ao) ao->open = 0; } +bool audio_output_is_pending(const struct audio_output *ao) +{ + return ao->command != AO_COMMAND_NONE; +} -- cgit v1.2.3