mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
spa: make a function to make a channel short name
Make a function that can generate and parse a short name for the positions that are not in the type list, like the AUX channels.
This commit is contained in:
parent
7177f8269d
commit
11f1298f53
16 changed files with 74 additions and 38 deletions
|
|
@ -925,11 +925,12 @@ static int snd_pcm_pipewire_set_chmap(snd_pcm_ioplug_t * io,
|
|||
}
|
||||
for (i = 0; i < map->channels; i++) {
|
||||
uint32_t pos = chmap_to_channel(map->pos[i]);
|
||||
char buf[8];
|
||||
if (i < max_position)
|
||||
position[i] = pos;
|
||||
pw_log_debug("map %d: %s / %s", i,
|
||||
snd_pcm_chmap_name(map->pos[i]),
|
||||
spa_debug_type_find_short_name(spa_type_audio_channel, pos));
|
||||
spa_type_audio_channel_make_short_name(pos, buf, sizeof(buf), "UNK"));
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue