summaryrefslogtreecommitdiffstats
path: root/src/modules/module-pipe-sink.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/module-pipe-sink.c')
-rw-r--r--src/modules/module-pipe-sink.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/modules/module-pipe-sink.c b/src/modules/module-pipe-sink.c
index 83ee06b7..1b6d0813 100644
--- a/src/modules/module-pipe-sink.c
+++ b/src/modules/module-pipe-sink.c
@@ -232,7 +232,7 @@ finish:
pa_log_debug("Thread shutting down");
}
-int pa__init(pa_core *c, pa_module*m) {
+int pa__init(pa_module*m) {
struct userdata *u;
struct stat st;
pa_sample_spec ss;
@@ -240,7 +240,6 @@ int pa__init(pa_core *c, pa_module*m) {
pa_modargs *ma;
char *t;
- pa_assert(c);
pa_assert(m);
if (!(ma = pa_modargs_new(m->argument, valid_modargs))) {
@@ -248,14 +247,14 @@ int pa__init(pa_core *c, pa_module*m) {
goto fail;
}
- ss = c->default_sample_spec;
+ ss = m->core->default_sample_spec;
if (pa_modargs_get_sample_spec_and_channel_map(ma, &ss, &map, PA_CHANNEL_MAP_DEFAULT) < 0) {
pa_log("Invalid sample format specification or channel map");
goto fail;
}
u = pa_xnew0(struct userdata, 1);
- u->core = c;
+ u->core = m->core;
u->module = m;
m->userdata = u;
pa_memchunk_reset(&u->memchunk);
@@ -283,7 +282,7 @@ int pa__init(pa_core *c, pa_module*m) {
goto fail;
}
- if (!(u->sink = pa_sink_new(c, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, &map))) {
+ if (!(u->sink = pa_sink_new(m->core, __FILE__, pa_modargs_get_value(ma, "sink_name", DEFAULT_SINK_NAME), 0, &ss, &map))) {
pa_log("Failed to create sink.");
goto fail;
}
@@ -309,15 +308,14 @@ fail:
if (ma)
pa_modargs_free(ma);
- pa__done(c, m);
+ pa__done(m);
return -1;
}
-void pa__done(pa_core *c, pa_module*m) {
+void pa__done(pa_module*m) {
struct userdata *u;
- pa_assert(c);
pa_assert(m);
if (!(u = m->userdata))