audioconvert: fix resampler delay value and add test

Resampler delay for N taps is N/2-1 input samples.

Add test that checks this.

When input rate is varying, the resampler also accumulates additional
sub-sample delay. The resampler does not currently have API to report
the instantaneous sub-sample delay.  Add knownfail test for it.
This commit is contained in:
Pauli Virtanen 2025-01-13 18:24:10 +02:00
parent 049ab37a6d
commit 2c2bed2aeb
3 changed files with 284 additions and 1 deletions

View file

@ -312,7 +312,7 @@ static void impl_native_reset (struct resample *r)
static uint32_t impl_native_delay (struct resample *r)
{
struct native_data *d = r->data;
return d->n_taps / 2;
return d->n_taps / 2 - 1;
}
int resample_native_init(struct resample *r)