From e53ca368a5448291ca2783b8061727635084618f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 23 Oct 2009 10:55:52 +0200 Subject: 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. --- src/output_internal.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/output_internal.h') diff --git a/src/output_internal.h b/src/output_internal.h index f27a10ec..0c25348a 100644 --- a/src/output_internal.h +++ b/src/output_internal.h @@ -27,6 +27,8 @@ enum audio_output_command { AO_COMMAND_NONE = 0, + AO_COMMAND_ENABLE, + AO_COMMAND_DISABLE, AO_COMMAND_OPEN, /** @@ -70,6 +72,12 @@ struct audio_output { */ bool enabled; + /** + * Is this device actually enabled, i.e. the "enable" method + * has succeeded? + */ + bool really_enabled; + /** * Is the device (already) open and functional? * -- cgit v1.2.3