mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-21 01:40:34 -05: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
|
|
@ -747,10 +747,11 @@ static int channelmap_default(struct channelmap *map, int n_channels)
|
|||
static void channelmap_print(struct channelmap *map)
|
||||
{
|
||||
uint32_t i;
|
||||
|
||||
char pos[8];
|
||||
for (i = 0; i < map->n_channels; i++) {
|
||||
const char *name = spa_type_audio_channel_to_short_name(map->channels[i]);
|
||||
fprintf(stderr, "%s%s", name, i + 1 < map->n_channels ? "," : "");
|
||||
fprintf(stderr, "%s%s", i ? "," : "",
|
||||
spa_type_audio_channel_make_short_name(map->channels[i],
|
||||
pos, sizeof(pos), "UNK"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue