From 74617389c88ccf630b8cce4b54d9e2fa5afb2259 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 16 Sep 2011 23:31:48 +0200 Subject: output_plugin: the plugin allocates the audio_output object Pass audio_output objects around instead of void pointers. This will give some more control to the plugin, and prepares for non-blocking audio outputs. --- src/output_internal.h | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) (limited to 'src/output_internal.h') diff --git a/src/output_internal.h b/src/output_internal.h index eba3aed9..9d975d78 100644 --- a/src/output_internal.h +++ b/src/output_internal.h @@ -27,6 +27,8 @@ #include +struct config_param; + enum audio_output_command { AO_COMMAND_NONE = 0, AO_COMMAND_ENABLE, @@ -63,12 +65,6 @@ struct audio_output { */ const struct audio_output_plugin *plugin; - /** - * The plugin's internal data. It is passed to every plugin - * method. - */ - void *data; - /** * The #mixer object associated with this audio output device. * May be NULL if none is available, or if software volume is @@ -254,7 +250,20 @@ audio_output_command_is_finished(const struct audio_output *ao) return ao->command == AO_COMMAND_NONE; } +struct audio_output * +audio_output_new(const struct config_param *param, + struct player_control *pc, + GError **error_r); + +bool +ao_base_init(struct audio_output *ao, + const struct audio_output_plugin *plugin, + const struct config_param *param, GError **error_r); + +void +ao_base_finish(struct audio_output *ao); + void -audio_output_destruct(struct audio_output *ao); +audio_output_free(struct audio_output *ao); #endif -- cgit v1.2.3