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_finish.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/output_finish.c') diff --git a/src/output_finish.c b/src/output_finish.c index ac7f7e0c..e11b4367 100644 --- a/src/output_finish.c +++ b/src/output_finish.c @@ -26,7 +26,7 @@ #include void -audio_output_destruct(struct audio_output *ao) +ao_base_finish(struct audio_output *ao) { assert(!ao->open); assert(ao->fail_timer == NULL); @@ -35,8 +35,6 @@ audio_output_destruct(struct audio_output *ao) if (ao->mixer != NULL) mixer_free(ao->mixer); - ao_plugin_finish(ao->plugin, ao->data); - g_cond_free(ao->cond); g_mutex_free(ao->mutex); @@ -50,3 +48,13 @@ audio_output_destruct(struct audio_output *ao) pcm_buffer_deinit(&ao->cross_fade_buffer); } + +void +audio_output_free(struct audio_output *ao) +{ + assert(!ao->open); + assert(ao->fail_timer == NULL); + assert(ao->thread == NULL); + + ao_plugin_finish(ao); +} -- cgit v1.2.3