alsa: make it possible to fix format

This commit is contained in:
Wim Taymans 2020-12-09 20:33:57 +01:00
parent 7d73f0b8d0
commit 7768a87a0b
5 changed files with 22 additions and 2 deletions

View file

@ -781,6 +781,8 @@ impl_init(const struct spa_handle_factory *factory,
this->default_channels = atoi(info->items[i].value);
} else if (!strcmp(info->items[i].key, SPA_KEY_AUDIO_RATE)) {
this->default_rate = atoi(info->items[i].value);
} else if (!strcmp(info->items[i].key, SPA_KEY_AUDIO_FORMAT)) {
this->default_format = spa_alsa_format_from_name(info->items[i].value, 128);
}
}