audioconvert: resampler: change resample_phase() unit to input samples

Report fractional delay in input samples instead of nsec at the nominal
input rate, as that is closer to what the value actually means.
This commit is contained in:
Pauli Virtanen 2025-01-18 12:39:21 +02:00
parent 9889d1ce0a
commit f3a9ebd569
4 changed files with 16 additions and 16 deletions

View file

@ -100,7 +100,7 @@ static void impl_peaks_reset (struct resample *r)
d->i_count = d->o_count = 0;
}
static int32_t impl_peaks_phase_ns (struct resample *r)
static float impl_peaks_phase (struct resample *r)
{
return 0;
}
@ -130,7 +130,7 @@ int resample_peaks_init(struct resample *r)
r->delay = impl_peaks_delay;
r->in_len = impl_peaks_in_len;
r->out_len = impl_peaks_out_len;
r->phase_ns = impl_peaks_phase_ns;
r->phase = impl_peaks_phase;
spa_log_debug(r->log, "peaks %p: in:%d out:%d features:%08x:%08x", r,
r->i_rate, r->o_rate, r->cpu_flags, d->peaks.cpu_flags);