mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-03-29 07:58:06 -04:00
Revert "module-rtp: Remove device_delay from timestamp math"
This reverts commit dcdc19238b.
Reverting this because it caused big sync errors of ~62 ms in test setups.
Further discussions about this can be found here:
https://gitlab.freedesktop.org/pipewire/pipewire/-/merge_requests/2666
Followup commits modify the device delay application (by scaling it),
which is another reason why this needs to be reverted.
This commit is contained in:
parent
cad1df748e
commit
a32e6e108c
1 changed files with 3 additions and 6 deletions
|
|
@ -98,12 +98,9 @@ static void rtp_audio_process_playback(void *data)
|
||||||
* pace of the driver. */
|
* pace of the driver. */
|
||||||
|
|
||||||
if (impl->io_position) {
|
if (impl->io_position) {
|
||||||
/* Use the clock position directly as the read index.
|
/* Shift clock position by stream delay to compensate
|
||||||
* Do NOT add device_delay here - the sink's DLL handles
|
* for processing and output delay. */
|
||||||
* matching its hardware clock to the driver pace. Adding
|
timestamp = impl->io_position->clock.position + device_delay;
|
||||||
* device_delay would create a feedback loop since rate
|
|
||||||
* adjustments affect both ringbuffer and device buffer. */
|
|
||||||
timestamp = impl->io_position->clock.position;
|
|
||||||
spa_ringbuffer_read_update(&impl->ring, timestamp);
|
spa_ringbuffer_read_update(&impl->ring, timestamp);
|
||||||
} else {
|
} else {
|
||||||
/* In the unlikely case that no spa_io_position pointer
|
/* In the unlikely case that no spa_io_position pointer
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue