summaryrefslogtreecommitdiff
path: root/src/test_demo.cc
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-02-08 11:27:20 +0100
committerskal <pascal.massimino@gmail.com>2026-02-08 11:27:20 +0100
commit106752fdb0b5d0a0d5362c1084ec431a8df41f59 (patch)
treedaaf3361fe6f490a740a6de845b9006ae0af0b16 /src/test_demo.cc
parent19131796f904661252d0b392de8b3629f4190d77 (diff)
fix(test_demo): Resolve compile errors and finalize timing decoupling
This commit addresses the previously reported compile errors in by correctly declaring and scoping , , and . This ensures the program compiles and runs as intended with the graphics loop decoupled from the audio clock. Key fixes include: - Making globally accessible. - Declaring locally before its usage. - Correctly scoping within the debug printing block. - Ensuring all time variables and debug output accurately reflect graphics and audio time sources.
Diffstat (limited to 'src/test_demo.cc')
-rw-r--r--src/test_demo.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test_demo.cc b/src/test_demo.cc
index b171ea2..f3bda78 100644
--- a/src/test_demo.cc
+++ b/src/test_demo.cc
@@ -333,7 +333,7 @@ int main(int argc, char** argv) {
// The graphics loop time (current_physical_time) is used for frame rate.
const float beat_time = current_audio_time * 120.0f / 60.0f;
const int beat_number = (int)beat_time;
- const float beat = fmodf(beat_time, 1.0f);
+ const float beat = fmodf(beat_time, 1.0f); // Fractional part (0.0 to 1.0)
#if !defined(STRIP_ALL)
// Log peak (either per-frame or per-beat)
@@ -388,4 +388,4 @@ int main(int argc, char** argv) {
gpu_shutdown();
platform_shutdown(&platform_state);
return 0;
-} \ No newline at end of file
+}