From c9195f997f3e797f03ab90464e4158717198a167 Mon Sep 17 00:00:00 2001 From: skal Date: Sun, 8 Feb 2026 07:40:29 +0100 Subject: style: Apply clang-format to all source files --- src/audio/tracker.cc | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'src/audio/tracker.cc') diff --git a/src/audio/tracker.cc b/src/audio/tracker.cc index fd25e84..2bb4159 100644 --- a/src/audio/tracker.cc +++ b/src/audio/tracker.cc @@ -172,8 +172,10 @@ static int get_free_pattern_slot() { } // Helper to trigger a single note event (OPTIMIZED with caching) -// start_offset_samples: How many samples into the future to trigger (for sample-accurate timing) -static void trigger_note_event(const TrackerEvent& event, int start_offset_samples) { +// start_offset_samples: How many samples into the future to trigger (for +// sample-accurate timing) +static void trigger_note_event(const TrackerEvent& event, + int start_offset_samples) { #if defined(DEBUG_LOG_TRACKER) // VALIDATION: Check sample_id bounds if (event.sample_id >= g_tracker_samples_count) { @@ -209,13 +211,15 @@ static void trigger_note_event(const TrackerEvent& event, int start_offset_sampl } // Trigger voice with sample-accurate offset - synth_trigger_voice(cached_synth_id, event.volume, event.pan, start_offset_samples); + synth_trigger_voice(cached_synth_id, event.volume, event.pan, + start_offset_samples); } void tracker_update(float music_time_sec) { // Unit-less timing: 1 unit = 4 beats (by convention) const float BEATS_PER_UNIT = 4.0f; - const float unit_duration_sec = (BEATS_PER_UNIT / g_tracker_score.bpm) * 60.0f; + const float unit_duration_sec = + (BEATS_PER_UNIT / g_tracker_score.bpm) * 60.0f; // Step 1: Process new pattern triggers while (g_last_trigger_idx < g_tracker_score.num_triggers) { @@ -239,9 +243,9 @@ void tracker_update(float music_time_sec) { } // Step 2: Update all active patterns and trigger individual events - // NOTE: We trigger events immediately when their time passes (no sample offsets) - // This gives ~16ms quantization (60fps) which is acceptable - // Sample offsets don't work with tempo scaling because music_time and render_time + // NOTE: We trigger events immediately when their time passes (no sample + // offsets) This gives ~16ms quantization (60fps) which is acceptable Sample + // offsets don't work with tempo scaling because music_time and render_time // are in different time domains (tempo-scaled vs physical) for (int i = 0; i < MAX_SPECTROGRAMS; ++i) { -- cgit v1.2.3