This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
The maximum difference between two counters can only be max_num_beats_buffered + max_burst_length Thus it is enough to compare counters MOD max_num_beats_buffered We round up to nearest power of two to avoid non power of two MOD