bluez5: remove resampler delay fudge factor

The resampler delay was off by one sample, so remove the corresponding
fudge factor here.  This matters for BAP output synchronization.

The resampler has also some fractional delay, so there can still be
sub-sample offset between the original and resampled timelines.  This is
not currently taken into account.
This commit is contained in:
Pauli Virtanen 2025-01-13 18:31:43 +02:00
parent 2c2bed2aeb
commit b952cfbe38

View file

@ -544,7 +544,6 @@ static uint64_t get_reference_time(struct impl *this, uint64_t *duration_ns_ret)
if (port->rate_match && this->position && resampling) { if (port->rate_match && this->position && resampling) {
t -= (uint64_t)port->rate_match->delay * SPA_NSEC_PER_SEC t -= (uint64_t)port->rate_match->delay * SPA_NSEC_PER_SEC
/ this->position->clock.rate.denom; / this->position->clock.rate.denom;
t += SPA_NSEC_PER_SEC / port->current_format.info.raw.rate;
} }
return t; return t;