aboutsummaryrefslogtreecommitdiffstats
path: root/src/output_control.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-10-23 10:55:52 +0200
committerMax Kellermann <max@duempel.org>2009-10-23 10:55:52 +0200
commite53ca368a5448291ca2783b8061727635084618f (patch)
tree596c18606cd386b580a23cc6d07cf121cca8db37 /src/output_control.h
parentc426a0bc5cc641ecd044c389f7180dad50a355bf (diff)
downloadmpd-e53ca368a5448291ca2783b8061727635084618f.tar.gz
mpd-e53ca368a5448291ca2783b8061727635084618f.tar.xz
mpd-e53ca368a5448291ca2783b8061727635084618f.zip
output_plugin: added methods enable() and disable()
With these methods, an output plugin can allocate some global resources only if it is actually enabled. The method enable() is called after daemonization, which allows for more sophisticated resource allocation during that method.
Diffstat (limited to '')
-rw-r--r--src/output_control.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/output_control.h b/src/output_control.h
index 72e3ed468..b2e48fa8d 100644
--- a/src/output_control.h
+++ b/src/output_control.h
@@ -41,6 +41,18 @@ audio_output_init(struct audio_output *ao, const struct config_param *param,
GError **error_r);
/**
+ * Enables the device.
+ */
+void
+audio_output_enable(struct audio_output *ao);
+
+/**
+ * Disables the device.
+ */
+void
+audio_output_disable(struct audio_output *ao);
+
+/**
* Opens or closes the device, depending on the "enabled" flag.
*
* @return true if the device is open