aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_api.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-29 16:40:07 +0200
committerMax Kellermann <max@duempel.org>2008-09-29 16:40:07 +0200
commitc13e8b5146993999a87373a98b5a3da4b6cf599a (patch)
treee4f24a2bce33e2863fe6232e0e5c7781ef706f6d /src/output_api.c
parentde7cda1d6e8df9edc436196d0a2db25757abd236 (diff)
downloadmpd-c13e8b5146993999a87373a98b5a3da4b6cf599a.tar.gz
mpd-c13e8b5146993999a87373a98b5a3da4b6cf599a.tar.xz
mpd-c13e8b5146993999a87373a98b5a3da4b6cf599a.zip
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.
Diffstat (limited to 'src/output_api.c')
-rw-r--r--src/output_api.c4
1 files changed, 4 insertions, 0 deletions
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;
+}