mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-19 08:57:00 -05:00
channelmap: introduce pa_channel_map_mask() and pa_channel_position_mask_t
This commit is contained in:
parent
261a4830fb
commit
01fa34ba8a
3 changed files with 22 additions and 0 deletions
|
|
@ -852,3 +852,15 @@ int pa_channel_map_has_position(const pa_channel_map *map, pa_channel_position_t
|
|||
|
||||
return 0;
|
||||
}
|
||||
|
||||
pa_channel_position_mask_t pa_channel_map_mask(const pa_channel_map *map) {
|
||||
unsigned c;
|
||||
pa_channel_position_mask_t r = 0;
|
||||
|
||||
pa_return_val_if_fail(pa_channel_map_valid(map), 0);
|
||||
|
||||
for (c = 0; c < map->channels; c++)
|
||||
r |= PA_CHANNEL_POSITION_MASK(map->map[c]);
|
||||
|
||||
return r;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue