]> code.delx.au - pulseaudio/blobdiff - src/modules/module-null-sink.c
introduce default channel map in addition to the default sample spec
[pulseaudio] / src / modules / module-null-sink.c
index daf9767c7b0be2cd37353fd97b0526ade221827a..e18da5fd180022d3f9c34accf85395c0ee26bf46 100644 (file)
@@ -262,6 +262,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;
@@ -324,6 +325,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_sink_linked_by(u->sink);
+}
+
 void pa__done(pa_module*m) {
     struct userdata *u;