]> code.delx.au - pulseaudio/blobdiff - src/modules/module-pipe-source.c
introduce default channel map in addition to the default sample spec
[pulseaudio] / src / modules / module-pipe-source.c
index 77310cabf2ce725419dbb0bb31f6e9258a3f6758..a42c53c365f555da12b3376d90c71730a965a51c 100644 (file)
@@ -221,6 +221,7 @@ int pa__init(pa_module*m) {
     }
 
     ss = m->core->default_sample_spec;
+    map = m->core->default_channel_map;
     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;
@@ -302,6 +303,15 @@ fail:
     return -1;
 }
 
+int pa__get_n_used(pa_module *m) {
+    struct userdata *u;
+
+    pa_assert(m);
+    pa_assert_se(u = m->userdata);
+
+    return pa_source_linked_by(u->source);
+}
+
 void pa__done(pa_module*m) {
     struct userdata *u;