Skip to content

Commit

Permalink
Bumps version, Updates quantize comment to better express the idea
Browse files Browse the repository at this point in the history
  • Loading branch information
Ciro S. Costa committed Jul 3, 2018
1 parent cb17bd0 commit 18757f3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.0.1
0.0.2
15 changes: 13 additions & 2 deletions editor/quantize.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,20 @@ package editor
// Quantize constraints a set of inputs that lie in a range to a single
// value that corresponds to the lower bound of such range.
//
// For instance, consider the following timestamps:
//
// 1 2 5 9 10 11 12
//
// Assuming that we quantize over [2,6), we'd cut any delays between 2 and
// 6 seconds to 2 second:
//
// 1 2 4 6 7 8 9 (with times already adjusted)
//
// The euristic is fairly simple:
//
// 1. capture all delays
// 2. for each delay, check if the delay fits in the quantization
// range.
// 2. for each delay, check if it's within an acceptable delay range
// 3. if it fits, reduce the delay to the maximum allowed (floor of
// the quantization range).
// 4. adjust the rest of the event stream.

0 comments on commit 18757f3

Please sign in to comment.