aboutsummaryrefslogtreecommitdiff
path: root/src/output_api.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-09-29 16:43:55 +0200
committerMax Kellermann <max@duempel.org>2008-09-29 16:43:55 +0200
commit6e21e24caed1a9497e876e4b89b12687aa73d6ad (patch)
treedd1fe746cdd61eafc82117421cf3633e014a9bef /src/output_api.h
parentc13e8b5146993999a87373a98b5a3da4b6cf599a (diff)
audio_output: added method pause()
pause() puts the audio output into pause mode: if supported, it may perform a special action, which keeps the device open, but does not play anything. Output plugins like "shout" might want to play silence during pause, so their clients won't be disconnected. Plugins which do not support pausing will simply be closed, and have to be reopened when unpaused. This pach includes an implementation for the shout plugin, which sends silence chunks.
Diffstat (limited to 'src/output_api.h')
-rw-r--r--src/output_api.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/output_api.h b/src/output_api.h
index 96acff77..1cad66e6 100644
--- a/src/output_api.h
+++ b/src/output_api.h
@@ -82,6 +82,16 @@ struct audio_output_plugin {
int (*play)(void *data, const char *playChunk, size_t size);
/**
+ * Pause the device. If supported, it may perform a special
+ * action, which keeps the device open, but does not play
+ * anything. Output plugins like "shout" might want to play
+ * silence during pause, so their clients won't be
+ * disconnected. Plugins which do not support pausing will
+ * simply be closed, and have to be reopened when unpaused.
+ */
+ void (*pause)(void *data);
+
+ /**
* Try to cancel data which may still be in the device's
* buffers.
*/
@@ -104,6 +114,7 @@ enum audio_output_command {
AO_COMMAND_OPEN,
AO_COMMAND_CLOSE,
AO_COMMAND_PLAY,
+ AO_COMMAND_PAUSE,
AO_COMMAND_CANCEL,
AO_COMMAND_SEND_TAG,
AO_COMMAND_KILL