mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-05 04:06:37 -05:00
module-rtp: Remove device_delay from timestamp math
This commit is contained in:
parent
b4b057196d
commit
dcdc19238b
1 changed files with 6 additions and 3 deletions
|
|
@ -98,9 +98,12 @@ static void rtp_audio_process_playback(void *data)
|
||||||
* pace of the driver. */
|
* pace of the driver. */
|
||||||
|
|
||||||
if (impl->io_position) {
|
if (impl->io_position) {
|
||||||
/* Shift clock position by stream delay to compensate
|
/* Use the clock position directly as the read index.
|
||||||
* for processing and output delay. */
|
* Do NOT add device_delay here - the sink's DLL handles
|
||||||
timestamp = impl->io_position->clock.position + device_delay;
|
* matching its hardware clock to the driver pace. Adding
|
||||||
|
* 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