diff --git a/Machines/Enterprise/Dave.cpp b/Machines/Enterprise/Dave.cpp index 00a4c1ad6..39a152630 100644 --- a/Machines/Enterprise/Dave.cpp +++ b/Machines/Enterprise/Dave.cpp @@ -323,8 +323,10 @@ Cycles TimedInterruptSource::get_next_sequence_point() const { const auto &channel = channels_[int(rate_) - int(InterruptRate::ToneGenerator0)]; const int cycles_until_interrupt = channel.value + 1 + (!channel.level) * (channel.reload + 1); - int result = 250'000 - (two_second_counter_ % 250'000); - return Cycles(std::min(result, cycles_until_interrupt)); + return Cycles(std::min( + 250'000 - (two_second_counter_ % 250'000), + cycles_until_interrupt + )); } } }