diff options
| author | skal <pascal.massimino@gmail.com> | 2026-02-08 19:10:11 +0100 |
|---|---|---|
| committer | skal <pascal.massimino@gmail.com> | 2026-02-08 19:10:11 +0100 |
| commit | 6071c9f6bea2d3890024cb47083b92d9ddbf0447 (patch) | |
| tree | 9c68b4c660cd2f33a7d0fde38876bc6725e17c02 /src/main.cc | |
| parent | cd807732799904f6731f460cc0469143c410c2c9 (diff) | |
refactor: Use tracker BPM instead of hardcoded values
Changes simulate_until() and beat calculation to use g_tracker_score.bpm
instead of hardcoded 120.0f or 128.0f values. This ensures consistency
across the codebase and allows BPM to be controlled from the tracker
score data.
Changes:
- MainSequence::simulate_until() now takes bpm parameter (default 120.0f)
- gpu_simulate_until() passes g_tracker_score.bpm to MainSequence
- main.cc --seek uses tracker BPM for simulation
- test_demo.cc beat calculation uses tracker BPM
- Added #include "audio/tracker.h" where needed
Impact: No functional change (default BPM remains 120.0f), but removes
hardcoded magic numbers and centralizes BPM control.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Diffstat (limited to 'src/main.cc')
| -rw-r--r-- | src/main.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main.cc b/src/main.cc index b2b62a8..ba12df5 100644 --- a/src/main.cc +++ b/src/main.cc @@ -153,7 +153,7 @@ int main(int argc, char** argv) { } // Simulate Visuals - gpu_simulate_until((float)seek_time); + gpu_simulate_until((float)seek_time, g_tracker_score.bpm); } #endif /* !defined(STRIP_ALL) */ |
