modules: support audio.layout where we can

This commit is contained in:
Wim Taymans 2025-10-30 12:29:31 +01:00
parent 8ba08f3029
commit ff0bc22cb1
28 changed files with 116 additions and 7 deletions

View file

@ -4274,10 +4274,18 @@ impl_init(const struct spa_handle_factory *factory,
this->direction = SPA_DIRECTION_INPUT;
}
else if (spa_streq(k, SPA_KEY_AUDIO_POSITION)) {
if (s != NULL)
spa_audio_parse_position_n(s, strlen(s),
this->props.channel_map, SPA_N_ELEMENTS(this->props.channel_map),
&this->props.n_channels);
if (s == NULL)
continue;
spa_audio_parse_position_n(s, strlen(s),
this->props.channel_map, SPA_N_ELEMENTS(this->props.channel_map),
&this->props.n_channels);
}
else if (spa_streq(k, SPA_KEY_AUDIO_LAYOUT)) {
if (s == NULL)
continue;
spa_audio_parse_layout(s,
this->props.channel_map, SPA_N_ELEMENTS(this->props.channel_map),
&this->props.n_channels);
}
else if (spa_streq(k, SPA_KEY_PORT_IGNORE_LATENCY))
this->port_ignore_latency = spa_atob(s);