pulse-tunnel: use format, channels and rate props

This commit is contained in:
Nicolai Syvertsen 2021-10-06 22:04:50 +02:00
parent 466715672e
commit 28c2e8ca56
3 changed files with 38 additions and 10 deletions

View file

@ -204,6 +204,15 @@ struct module *create_module_tunnel_sink(struct impl *impl, const char *argument
}
audio_info_to_props(&info, stream_props);
if ((str = pw_properties_get(props, "format")) != NULL) {
uint32_t id = format_paname2id(str, strlen(str));
if (id == SPA_AUDIO_FORMAT_UNKNOWN) {
res = -EINVAL;
goto out;
}
pw_properties_set(stream_props, PW_KEY_AUDIO_FORMAT, format_id2name(id));
}
module = module_new(impl, &module_tunnel_sink_methods, sizeof(*d));
if (module == NULL) {