From f2336d2efca34078e71fa0bbf72d5e1cf16e14ba Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sat, 26 Jun 2021 23:16:00 -0400 Subject: [PATCH] I think reloads occur after overflow, not before. --- Machines/Enterprise/Dave.cpp | 3 ++- .../xcshareddata/xcschemes/Clock Signal.xcscheme | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Machines/Enterprise/Dave.cpp b/Machines/Enterprise/Dave.cpp index a030edb0f..8d5ef6593 100644 --- a/Machines/Enterprise/Dave.cpp +++ b/Machines/Enterprise/Dave.cpp @@ -53,10 +53,11 @@ void Dave::get_samples(std::size_t number_of_samples, int16_t *target) { // Step 1: divide input clock to 125,000 Hz (?) for(size_t c = 0; c < number_of_samples; c++) { #define update_channel(x) \ - --channels_[x].count; \ if(!channels_[x].count) { \ channels_[x].output ^= true; \ channels_[x].count = channels_[x].reload; \ + } else { \ + --channels_[x].count; \ } update_channel(0); diff --git a/OSBindings/Mac/Clock Signal.xcodeproj/xcshareddata/xcschemes/Clock Signal.xcscheme b/OSBindings/Mac/Clock Signal.xcodeproj/xcshareddata/xcschemes/Clock Signal.xcscheme index 54b355ae8..85c8c1e2c 100644 --- a/OSBindings/Mac/Clock Signal.xcodeproj/xcshareddata/xcschemes/Clock Signal.xcscheme +++ b/OSBindings/Mac/Clock Signal.xcodeproj/xcshareddata/xcschemes/Clock Signal.xcscheme @@ -73,6 +73,7 @@ debugDocumentVersioning = "YES" migratedStopOnEveryIssue = "YES" debugServiceExtension = "internal" + enableGPUShaderValidationMode = "2" allowLocationSimulation = "NO">