-/* $Id$ */
-
/***
This file is part of PulseAudio.
pa_module *m;
ss = u->core->default_sample_spec;
- pa_channel_map_init_auto(&cm, ss.channels, PA_CHANNEL_MAP_DEFAULT);
+ cm = u->core->default_channel_map;
for (l = txt; l; l = l->next) {
char *key, *value;
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) {
}
if (!channel_map_set && cm.channels != ss.channels)
- pa_channel_map_init_auto(&cm, ss.channels, PA_CHANNEL_MAP_DEFAULT);
+ pa_channel_map_init_extend(&cm, ss.channels, PA_CHANNEL_MAP_DEFAULT);
if (!pa_sample_spec_valid(&ss)) {
pa_log("Service '%s' contains an invalid sample specification.", name);
t, dname,
pa_channel_map_snprint(cmt, sizeof(cmt), &cm));
- pa_log_debug("Loading module-tunnel-%s with arguments '%s'", module_name, args);
+ pa_log_debug("Loading %s with arguments '%s'", module_name, args);
if ((m = pa_module_load(u->core, module_name, args))) {
tnl->module_index = m->index;
struct tunnel *t2;
if ((t2 = pa_hashmap_get(u->tunnels, t))) {
- pa_module_unload_by_index(u->core, t2->module_index);
+ pa_module_unload_request_by_index(u->core, t2->module_index, TRUE);
pa_hashmap_remove(u->tunnels, t2);
tunnel_free(t2);
}
browser_cb, u))) {
pa_log("avahi_service_browser_new() failed: %s", avahi_strerror(avahi_client_errno(c)));
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
}
}
browser_cb, u))) {
pa_log("avahi_service_browser_new() failed: %s", avahi_strerror(avahi_client_errno(c)));
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
}
}
if (!(u->client = avahi_client_new(u->avahi_poll, AVAHI_CLIENT_NO_FAIL, client_callback, u, &error))) {
pa_log("avahi_client_new() failed: %s", avahi_strerror(error));
- pa_module_unload_request(u->module);
+ pa_module_unload_request(u->module, TRUE);
}
}
struct tunnel *t;
while ((t = pa_hashmap_steal_first(u->tunnels))) {
- pa_module_unload_by_index(u->core, t->module_index);
+ pa_module_unload_request_by_index(u->core, t->module_index, TRUE);
tunnel_free(t);
}