audioconvert: add resample.prefill option

Add a resampler option to prefill the resampler with 0. This then
results in the resampler always outputing and consuming the same
amount of data instead of a short buffer in the beginning.
This commit is contained in:
Wim Taymans 2022-09-19 12:35:49 +02:00
parent d48627d0e7
commit 31f9e18edb
3 changed files with 8 additions and 1 deletions

View file

@ -2844,6 +2844,8 @@ impl_init(const struct spa_handle_factory *factory,
spa_atou32(s, &this->quantum_limit, 0);
else if (spa_streq(k, "resample.peaks"))
this->peaks = spa_atob(s);
else if (spa_streq(k, "resample.prefill"))
this->resample.options |= RESAMPLE_OPTION_PREFILL;
else if (spa_streq(k, "factory.mode")) {
if (spa_streq(s, "merge"))
this->direction = SPA_DIRECTION_OUTPUT;