From 5d45824cd5c86756b8c706ba894cb63dedb70537 Mon Sep 17 00:00:00 2001 From: George Kiagiadakis Date: Wed, 18 Jul 2018 11:42:55 +0300 Subject: port back to pulseaudio 10.0 API (from 11.0) Change-Id: I3ebe02e3bae313da8eb9abe13b4b3cef542e7ec6 Signed-off-by: George Kiagiadakis --- module-4a-client.c | 52 ++++++++++++++++++++++++++-------------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'module-4a-client.c') diff --git a/module-4a-client.c b/module-4a-client.c index eabeec7..83888c7 100644 --- a/module-4a-client.c +++ b/module-4a-client.c @@ -119,7 +119,7 @@ static pa_sink *load_sink_module(pa_core *core, const char *module, char *params pa_sink *target = NULL; uint32_t idx; - if (pa_module_load(&m, core, module, params) < 0) { + if (!(m = pa_module_load(core, module, params))) { pa_log("Failed to load module %s %s", module, params); return NULL; } @@ -312,6 +312,31 @@ static pa_hook_result_t sink_input_unlink_post_cb(pa_core *core, return PA_HOOK_OK; } +void pa__done(pa_module *self) { + m4a_data *d; + + pa_assert(self); + + d = self->userdata; + + while (d->streams) + m4a_stream_free(d->streams); + + pa_dynarray_free(d->roles); + pa_mutex_free(d->lock); + + if (d->ma) + pa_modargs_free(d->ma); + + if (d->sink_input_put_slot) + pa_hook_slot_free(d->sink_input_put_slot); + if (d->sink_input_unlink_post_slot) + pa_hook_slot_free(d->sink_input_unlink_post_slot); + + if (d->comm) + m4a_afb_comm_free(d->comm); +} + int pa__init(pa_module *self) { m4a_data *d; const char *uri; @@ -347,28 +372,3 @@ fail: pa__done(self); return -1; } - -void pa__done(pa_module *self) { - m4a_data *d; - - pa_assert(self); - - d = self->userdata; - - while (d->streams) - m4a_stream_free(d->streams); - - pa_dynarray_free(d->roles); - pa_mutex_free(d->lock); - - if (d->ma) - pa_modargs_free(d->ma); - - if (d->sink_input_put_slot) - pa_hook_slot_free(d->sink_input_put_slot); - if (d->sink_input_unlink_post_slot) - pa_hook_slot_free(d->sink_input_unlink_post_slot); - - if (d->comm) - m4a_afb_comm_free(d->comm); -} -- cgit 1.2.3-korg