alsa: add api.alsa.headroom setting

Can be used to tweak the extra distance kept between the hardware
and software pointers when reading and writing.

See #289
This commit is contained in:
Wim Taymans 2021-01-14 17:10:05 +01:00
parent abe73c9146
commit 7347b5ef05
5 changed files with 13 additions and 1 deletions

View file

@ -816,6 +816,8 @@ impl_init(const struct spa_handle_factory *factory,
}
} else if (!strcmp(info->items[i].key, "api.alsa.period-size")) {
this->default_period_size = atoi(info->items[i].value);
} else if (!strcmp(info->items[i].key, "api.alsa.headroom")) {
this->default_headroom = atoi(info->items[i].value);
}
}
return 0;