1
0
mirror of https://github.com/TomHarte/CLK.git synced 2025-01-13 22:32:03 +00:00

Fixes exit from random gain noise.

This commit is contained in:
Thomas Harte 2020-07-15 22:44:54 -04:00
parent 8da7806ee9
commit 9a952c889f

View File

@ -282,7 +282,7 @@ void Drive::get_next_event(float duration_already_passed) {
// If this random transition is closer than 5µs to the next real bit,
// discard it.
if(random_interval_ < current_event_.length - 5.0f / 1'000'000.f) {
if(random_interval_ - 5.0f / 1'000'000.f < current_event_.length) {
random_interval_ = 0.0f;
} else {
random_interval_ -= current_event_.length;