From 8ce27b7e15f0fc65c8ee78950c7501660b936178 Mon Sep 17 00:00:00 2001 From: skal Date: Sat, 14 Feb 2026 15:14:25 +0100 Subject: style: Apply clang-format to codebase --- src/app/test_demo.cc | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'src/app/test_demo.cc') diff --git a/src/app/test_demo.cc b/src/app/test_demo.cc index 2a91d37..39dbcba 100644 --- a/src/app/test_demo.cc +++ b/src/app/test_demo.cc @@ -20,10 +20,10 @@ extern float GetDemoDuration(); extern void LoadTimeline(MainSequence& main_seq, const GpuContext& ctx); // Inline peak meter effect for debugging audio-visual sync -#include "gpu/post_process_helper.h" -#include "gpu/shader_composer.h" #include "effects/cnn_effect.h" #include "effects/cnn_v2_effect.h" +#include "gpu/post_process_helper.h" +#include "gpu/shader_composer.h" class PeakMeterEffect : public PostProcessEffect { public: @@ -81,11 +81,11 @@ class PeakMeterEffect : public PostProcessEffect { )"; // Compose shader with common_uniforms to get CommonUniforms definition - std::string shader_code = ShaderComposer::Get().Compose( - {"common_uniforms"}, shader_main); + std::string shader_code = + ShaderComposer::Get().Compose({"common_uniforms"}, shader_main); - pipeline_ = - create_post_process_pipeline(ctx_.device, ctx_.format, shader_code.c_str()); + pipeline_ = create_post_process_pipeline(ctx_.device, ctx_.format, + shader_code.c_str()); } void update_bind_group(WGPUTextureView input_view) override { @@ -100,7 +100,7 @@ class PeakMeterEffect : public PostProcessEffect { } }; -static int g_cnn_version = 2; // Default to v2 +static int g_cnn_version = 2; // Default to v2 #if !defined(STRIP_ALL) static void print_usage(const char* prog_name) { @@ -368,9 +368,11 @@ int main(int argc, char** argv) { const float visual_peak = fminf(raw_peak * 8.0f, 1.0f); // Beat calculation: convert audio time to musical beats - const float absolute_beat_time = current_audio_time * g_tracker_score.bpm / 60.0f; + const float absolute_beat_time = + current_audio_time * g_tracker_score.bpm / 60.0f; const int beat_number = (int)absolute_beat_time; - const float beat_phase = fmodf(absolute_beat_time, 1.0f); // Fractional part (0.0 to 1.0) + const float beat_phase = + fmodf(absolute_beat_time, 1.0f); // Fractional part (0.0 to 1.0) #if !defined(STRIP_ALL) // Log peak (either per-frame or per-beat) @@ -401,9 +403,10 @@ int main(int argc, char** argv) { current_physical_time, current_audio_time, g_music_time, beat_number, beat_phase, visual_peak, g_tempo_scale); } else { - printf("[GraphicsT=%.2f, AudioT=%.2f, Beat=%d, Phase=%.2f, Peak=%.2f]\n", - current_physical_time, current_audio_time, beat_number, beat_phase, - visual_peak); + printf( + "[GraphicsT=%.2f, AudioT=%.2f, Beat=%d, Phase=%.2f, Peak=%.2f]\n", + current_physical_time, current_audio_time, beat_number, beat_phase, + visual_peak); } last_graphics_print_time = current_physical_time; } @@ -411,8 +414,8 @@ int main(int argc, char** argv) { // Draw graphics using physical time and musical beat time const float graphics_frame_time = (float)current_physical_time; - gpu_draw(visual_peak, aspect_ratio, graphics_frame_time, - absolute_beat_time, beat_phase); + gpu_draw(visual_peak, aspect_ratio, graphics_frame_time, absolute_beat_time, + beat_phase); // Update audio systems (tracker, synth, etc.) based on audio time // progression -- cgit v1.2.3