diff options
| author | 2025-10-30 14:40:08 -0400 | |
|---|---|---|
| committer | 2025-10-30 14:40:08 -0400 | |
| commit | 90da3b27d939b3b7af1cf7fed10dfaaa7e271622 (patch) | |
| tree | f0cf96c76d5c83470d2c50dd69d2d3e39a503fab /src/buffer | |
| parent | 77837d7b63240c069b3351a919a7d2af670f46cd (diff) | |
| download | camu-90da3b27d939b3b7af1cf7fed10dfaaa7e271622.tar.gz camu-90da3b27d939b3b7af1cf7fed10dfaaa7e271622.tar.bz2 camu-90da3b27d939b3b7af1cf7fed10dfaaa7e271622.zip | |
Fixes from testing sink change, document things
Signed-off-by: Andrew Opalach <andrew@akon.city>
Diffstat (limited to 'src/buffer')
| -rw-r--r-- | src/buffer/clock.c | 14 |
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; } } |