summaryrefslogtreecommitdiff
path: root/src/buffer
diff options
context:
space:
mode:
Diffstat (limited to 'src/buffer')
-rw-r--r--src/buffer/clock.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/buffer/clock.c b/src/buffer/clock.c
index 508a899..67a229b 100644
--- a/src/buffer/clock.c
+++ b/src/buffer/clock.c
@@ -44,13 +44,13 @@ void camu_clock_seek(struct camu_clock *clock, f64 base, u64 target)
al_atomic_store(f64)(&clock->tick, tick, AL_ATOMIC_RELAXED);
}
} else {
- // Don't touch clock->pause here for the sake of sync.
- // Theoretically, the sink could rely on a CLOCK_PAUSED event from an entry
- // even after it was seeked. That would ultimately maintain sync but the
- // clock would report the old position in get_pts() before triggering CLOCK_PAUSED,
- // likely confusing the audio/video buffers of an entry. This is mitigated in
- // CLIENT_REMOVE_BUFFERS by immediately switching to the target instead of waiting for
- // a clock_callback().
+ // Don't touch clock->pause here for the sake of sync. This means,
+ // theoretically, the sink could still rely on a CLOCK_PAUSED callback
+ // from an entry even after it was seeked. That would ultimately maintain sync but
+ // the clock would report the old position in get_pts() before triggering CLOCK_PAUSED.
+ // Likely confusing an entry's buffers and causing excessive catchup or delay.
+ // We mitigate this sink-side by immediately switching to a potential target in
+ // CLIENT_REMOVE_BUFFERS, if possible, which is always called before an entry is seeked.
clock->paused_at = 0.0;
}
}