diff options
author | Max Kellermann <max@duempel.org> | 2011-09-16 23:31:48 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-09-19 09:41:21 +0200 |
commit | 74617389c88ccf630b8cce4b54d9e2fa5afb2259 (patch) | |
tree | 3d05faad2c2b3b2e9e885f2c391a35fe8f06553a /src/output_internal.h | |
parent | b4a8b8c0d4bf82fc56572c3f8e79108d22d78132 (diff) | |
download | mpd-74617389c88ccf630b8cce4b54d9e2fa5afb2259.tar.gz mpd-74617389c88ccf630b8cce4b54d9e2fa5afb2259.tar.xz mpd-74617389c88ccf630b8cce4b54d9e2fa5afb2259.zip |
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.
Diffstat (limited to 'src/output_internal.h')
-rw-r--r-- | src/output_internal.h | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/src/output_internal.h b/src/output_internal.h index eba3aed91..9d975d789 100644 --- a/src/output_internal.h +++ b/src/output_internal.h @@ -27,6 +27,8 @@ #include <time.h> +struct config_param; + enum audio_output_command { AO_COMMAND_NONE = 0, AO_COMMAND_ENABLE, @@ -64,12 +66,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 * configured. @@ -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 |