pulse-server: add channel-map in echo-cancel module

This commit is contained in:
Wim Taymans 2022-12-15 13:12:47 +01:00
parent 7758240c79
commit f7c49bbdde

View file

@ -70,6 +70,7 @@ static int module_echo_cancel_load(struct module *module)
const char *str; const char *str;
char *args; char *args;
size_t size; size_t size;
uint32_t i;
if ((f = open_memstream(&args, &size)) == NULL) if ((f = open_memstream(&args, &size)) == NULL)
return -errno; return -errno;
@ -85,7 +86,13 @@ static int module_echo_cancel_load(struct module *module)
fprintf(f, " audio.rate = %u", data->info.rate); fprintf(f, " audio.rate = %u", data->info.rate);
if (data->info.channels != 0) { if (data->info.channels != 0) {
fprintf(f, " audio.channels = %u", data->info.channels); fprintf(f, " audio.channels = %u", data->info.channels);
/* TODO: convert channel positions to string */ if (!(data->info.flags & SPA_AUDIO_FLAG_UNPOSITIONED)) {
fprintf(f, " audio.position = [ ");
for (i = 0; i < data->info.channels; i++)
fprintf(f, "%s%s", i == 0 ? "" : ",",
channel_id2name(data->info.position[i]));
fprintf(f, " ]");
}
} }
fprintf(f, " source.props = {"); fprintf(f, " source.props = {");
pw_properties_serialize_dict(f, &data->source_props->dict, 0); pw_properties_serialize_dict(f, &data->source_props->dict, 0);