summaryrefslogtreecommitdiff
path: root/src/audio
diff options
context:
space:
mode:
authorskal <pascal.massimino@gmail.com>2026-01-28 09:34:29 +0100
committerskal <pascal.massimino@gmail.com>2026-01-28 09:34:29 +0100
commit7631eaa56df1aea834998e9ce829bfb5937cdfdc (patch)
tree7aaaef0de78a9a266abda4a8f5f608183a435195 /src/audio
parent302d883f34864bc66a5e04532ae27d7e89fd94e8 (diff)
docs: Update project context and session notes
Summarizes recent implementations including Asset Management, audio/visual fixes, and style improvements.
Diffstat (limited to 'src/audio')
-rw-r--r--src/audio/synth.cc12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/audio/synth.cc b/src/audio/synth.cc
index 8380301..2242d5c 100644
--- a/src/audio/synth.cc
+++ b/src/audio/synth.cc
@@ -35,7 +35,8 @@ static struct {
} g_synth_data;
static Voice g_voices[MAX_VOICES];
-static volatile float g_current_output_peak = 0.0f; // Global peak for visualization
+static volatile float g_current_output_peak =
+ 0.0f; // Global peak for visualization
void synth_init() {
memset(&g_synth_data, 0, sizeof(g_synth_data));
@@ -183,9 +184,8 @@ void synth_render(float *output_buffer, int num_frames) {
output_buffer[i * 2 + 1] = right_sample;
// Update the peak with the new max (attack)
- g_current_output_peak =
- fmaxf(g_current_output_peak,
- fmaxf(fabsf(left_sample), fabsf(right_sample)));
+ g_current_output_peak = fmaxf(
+ g_current_output_peak, fmaxf(fabsf(left_sample), fabsf(right_sample)));
}
}
@@ -199,4 +199,6 @@ int synth_get_active_voice_count() {
return count;
}
-float synth_get_output_peak() { return g_current_output_peak; }
+float synth_get_output_peak() {
+ return g_current_output_peak;
+}