alsa: add params to set default internal latency

This commit is contained in:
Wim Taymans 2021-08-17 10:15:40 +02:00
parent 6d196b1d11
commit a2083d12d4
3 changed files with 11 additions and 0 deletions

View file

@ -881,6 +881,10 @@ impl_init(const struct spa_handle_factory *factory,
this->default_format = spa_alsa_format_from_name(s, strlen(s));
} else if (spa_streq(k, SPA_KEY_AUDIO_POSITION)) {
spa_alsa_parse_position(&this->default_pos, s, strlen(s));
} else if (spa_streq(k, "latency.internal.rate")) {
this->process_latency.rate = atoi(s);
} else if (spa_streq(k, "latency.internal.ns")) {
this->process_latency.ns = atoi(s);
} else if (spa_streq(k, "api.alsa.period-size")) {
this->default_period_size = atoi(s);
} else if (spa_streq(k, "api.alsa.headroom")) {

View file

@ -891,6 +891,10 @@ impl_init(const struct spa_handle_factory *factory,
this->default_format = spa_alsa_format_from_name(s, strlen(s));
} else if (spa_streq(k, SPA_KEY_AUDIO_POSITION)) {
spa_alsa_parse_position(&this->default_pos, s, strlen(s));
} else if (spa_streq(k, "latency.internal.rate")) {
this->process_latency.rate = atoi(s);
} else if (spa_streq(k, "latency.internal.ns")) {
this->process_latency.ns = atoi(s);
} else if (spa_streq(k, "api.alsa.period-size")) {
this->default_period_size = atoi(s);
} else if (spa_streq(k, "api.alsa.headroom")) {