From 068890fa8a03c62bc6a0d4b2ab57b194b933fa2a Mon Sep 17 00:00:00 2001 From: Scott Lamb Date: Fri, 30 Dec 2016 19:44:41 -0800 Subject: [PATCH] Improve ClockAdjuster comments --- src/dir.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/dir.rs b/src/dir.rs index 0181dc9..7a5f001 100644 --- a/src/dir.rs +++ b/src/dir.rs @@ -468,7 +468,10 @@ struct ClockAdjuster { impl ClockAdjuster { fn new(local_time_delta: Option) -> Self { - // Correct up to 500 ppm, or 2,700/90,000ths of a second over the course of a minute. + // Pick an adjustment rate to correct local_time_delta over the next minute (the + // desired duration of a single recording). Cap the rate at 500 ppm (which corrects + // 2,700/90,000ths of a second over a minute) to prevent noticeably speeding up or slowing + // down playback. let (every, ndir) = match local_time_delta { None | Some(0) => (i32::max_value(), 0), Some(d) if d <= -2700 => (2000, 1),