aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2018-07-18 11:42:55 +0300
committerGeorge Kiagiadakis <george.kiagiadakis@collabora.com>2018-08-28 12:14:11 +0300
commit5d45824cd5c86756b8c706ba894cb63dedb70537 (patch)
tree25b52678f748cde80aae935cfe555e8d2fd81bc0
parent4f16a8fdc6703edb908e248c9076c49ddeb653a9 (diff)
port back to pulseaudio 10.0 API (from 11.0)
Change-Id: I3ebe02e3bae313da8eb9abe13b4b3cef542e7ec6 Signed-off-by: George Kiagiadakis <george.kiagiadakis@collabora.com>
-rw-r--r--module-4a-client.c52
1 files changed, 26 insertions, 26 deletions
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);
-}