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.
This commit is contained in:
Max Kellermann
2009-10-23 10:55:52 +02:00
parent c426a0bc5c
commit e53ca368a5
15 changed files with 213 additions and 1 deletions

View File

@@ -180,6 +180,7 @@ audio_output_init(struct audio_output *ao, const struct config_param *param,
ao->plugin = plugin;
ao->enabled = config_get_block_bool(param, "enabled", true);
ao->really_enabled = false;
ao->open = false;
ao->pause = false;
ao->fail_timer = NULL;