mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-28 01:40:43 -05:00
spa: parse the audio.position completetly
Parse the audio.position spec completely so that we have the right number of channels but only store the first max_position channels. Also rename some field to make it clear that this is about the max number of channel positions.
This commit is contained in:
parent
ae50bb5dc0
commit
6465a63bf6
4 changed files with 13 additions and 11 deletions
|
|
@ -72,7 +72,7 @@ struct buffer {
|
|||
#define BW_PERIOD (3 * SPA_NSEC_PER_SEC)
|
||||
|
||||
struct channel_map {
|
||||
uint32_t channels;
|
||||
uint32_t n_pos;
|
||||
uint32_t pos[MAX_CHANNELS];
|
||||
};
|
||||
|
||||
|
|
@ -315,7 +315,7 @@ void spa_alsa_emit_port_info(struct state *state, bool full);
|
|||
|
||||
static inline void spa_alsa_parse_position(struct channel_map *map, const char *val, size_t len)
|
||||
{
|
||||
spa_audio_parse_position_n(val, len, map->pos, SPA_N_ELEMENTS(map->pos), &map->channels);
|
||||
spa_audio_parse_position_n(val, len, map->pos, SPA_N_ELEMENTS(map->pos), &map->n_pos);
|
||||
}
|
||||
|
||||
static inline uint32_t spa_alsa_parse_rates(uint32_t *rates, uint32_t max, const char *val, size_t len)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue