]> code.delx.au - pulseaudio/blobdiff - src/modules/module-zeroconf-discover.c
introduce default channel map in addition to the default sample spec
[pulseaudio] / src / modules / module-zeroconf-discover.c
index a4fbf020b64175878016a6a6d49b8ab1928affd1..5123ead897185ae1b6f0ccb42e13ec27945f51c5 100644 (file)
@@ -162,7 +162,7 @@ static void resolver_cb(
         pa_module *m;
 
         ss = u->core->default_sample_spec;
-        pa_channel_map_init_extend(&cm, ss.channels, PA_CHANNEL_MAP_DEFAULT);
+        cm = u->core->default_channel_map;
 
         for (l = txt; l; l = l->next) {
             char *key, *value;
@@ -173,9 +173,9 @@ static void resolver_cb(
                 device = value;
                 value = NULL;
             } else if (strcmp(key, "rate") == 0)
-                ss.rate = atoi(value);
+                ss.rate = (uint32_t) atoi(value);
             else if (strcmp(key, "channels") == 0)
-                ss.channels = atoi(value);
+                ss.channels = (uint8_t) atoi(value);
             else if (strcmp(key, "format") == 0)
                 ss.format = pa_parse_sample_format(value);
             else if (strcmp(key, "channel_map") == 0) {
@@ -286,7 +286,7 @@ static void browser_cb(
         struct tunnel *t2;
 
         if ((t2 = pa_hashmap_get(u->tunnels, t))) {
-            pa_module_unload_by_index(u->core, t2->module_index, TRUE);
+            pa_module_unload_request_by_index(u->core, t2->module_index, TRUE);
             pa_hashmap_remove(u->tunnels, t2);
             tunnel_free(t2);
         }
@@ -427,7 +427,7 @@ void pa__done(pa_module*m) {
         struct tunnel *t;
 
         while ((t = pa_hashmap_steal_first(u->tunnels))) {
-            pa_module_unload_by_index(u->core, t->module_index, TRUE);
+            pa_module_unload_request_by_index(u->core, t->module_index, TRUE);
             tunnel_free(t);
         }