summaryrefslogtreecommitdiff
path: root/src/tests/test_tracker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/tests/test_tracker.cc')
-rw-r--r--src/tests/test_tracker.cc21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/tests/test_tracker.cc b/src/tests/test_tracker.cc
index ad84163..2a9239c 100644
--- a/src/tests/test_tracker.cc
+++ b/src/tests/test_tracker.cc
@@ -1,17 +1,16 @@
// This file is part of the 64k demo project.
// It tests the core functionality of the audio tracker engine.
-#include "audio/tracker.h"
-#include "audio/synth.h"
#include "audio/gen.h"
+#include "audio/synth.h"
+#include "audio/tracker.h"
// #include "generated/music_data.h" // Will be generated by tracker_compiler
#include <assert.h>
#include <stdio.h>
-// Forward declaration for generated data to avoid compilation issues before generation
-// extern const NoteParams g_tracker_samples[];
-// extern const uint32_t g_tracker_samples_count;
-// extern const TrackerPattern g_tracker_patterns[];
+// Forward declaration for generated data to avoid compilation issues before
+// generation extern const NoteParams g_tracker_samples[]; extern const uint32_t
+// g_tracker_samples_count; extern const TrackerPattern g_tracker_patterns[];
// extern const uint32_t g_tracker_patterns_count;
// extern const TrackerScore g_tracker_score;
@@ -28,7 +27,8 @@ void test_tracker_pattern_triggering() {
// Test 1: Trigger patterns at 0.0f
tracker_update(0.0f);
printf("Actual active voice count: %d\n", synth_get_active_voice_count());
- // Expect 3 voices (one for each pattern triggered at 0.0f: drum_loop, hihat_roll, em_melody)
+ // Expect 3 voices (one for each pattern triggered at 0.0f: drum_loop,
+ // hihat_roll, em_melody)
assert(synth_get_active_voice_count() == 3);
// Test 2: Advance time slightly
@@ -39,9 +39,10 @@ void test_tracker_pattern_triggering() {
tracker_update(3.0f);
// Voices from 0.0f triggers might have ended, but new ones haven't started.
// synth_get_active_voice_count might drop if previous voices ended.
- // For this test, we assume voices triggered at 0.0f are still active for a short duration.
- // A more robust test would check for specific spectrograms or mock synth.
- // For now, we expect voices to still be somewhat active or new ones to be triggered if there's overlap
+ // For this test, we assume voices triggered at 0.0f are still active for a
+ // short duration. A more robust test would check for specific spectrograms or
+ // mock synth. For now, we expect voices to still be somewhat active or new
+ // ones to be triggered if there's overlap
assert(synth_get_active_voice_count() > 0);
printf("Tracker pattern triggering test PASSED\n");