@@ -547,10 +547,6 @@ void gui_draw(Synth *synth, SDL_Window *window, SDL_GLContext gl_context,
547547 float bar_spacing = 10 .0f ;
548548
549549 // Peak meter
550- ImGui::Text (" Peak: %.1f dB" , synth->mixer .peak_level );
551- ImGui::SameLine ();
552-
553- // Draw peak meter bar
554550 ImVec2 peak_bar_pos = ImGui::GetCursorScreenPos ();
555551 float normalized_peak = fmaxf (0 .0f , fminf (1 .0f , (synth->mixer .peak_level + 60 .0f ) / 60 .0f )); // Normalize -60 to 0 dB
556552 ImDrawList* draw_list = ImGui::GetWindowDrawList ();
@@ -561,12 +557,10 @@ void gui_draw(Synth *synth, SDL_Window *window, SDL_GLContext gl_context,
561557 ImVec2 (peak_bar_pos.x + bar_width, peak_bar_pos.y + bar_height),
562558 ImColor (1 .0f , 1 .0f , 1 .0f , 1 .0f )); // White border
563559 ImGui::Dummy (ImVec2 (bar_width + bar_spacing, bar_height));
564-
565- // RMS meter
566- ImGui::Text (" RMS: %.1f dB" , synth->mixer .rms_level );
567560 ImGui::SameLine ();
561+ ImGui::Text (" Peak: %.1f dB" , synth->mixer .peak_level );
568562
569- // Draw RMS meter bar
563+ // RMS meter
570564 ImVec2 rms_bar_pos = ImGui::GetCursorScreenPos ();
571565 float normalized_rms = fmaxf (0 .0f , fminf (1 .0f , (synth->mixer .rms_level + 60 .0f ) / 60 .0f )); // Normalize -60 to 0 dB
572566 draw_list->AddRectFilled (rms_bar_pos,
@@ -575,6 +569,8 @@ void gui_draw(Synth *synth, SDL_Window *window, SDL_GLContext gl_context,
575569 draw_list->AddRect (rms_bar_pos,
576570 ImVec2 (rms_bar_pos.x + bar_width, rms_bar_pos.y + bar_height),
577571 ImColor (1 .0f , 1 .0f , 1 .0f , 1 .0f )); // White border
572+ ImGui::SameLine ();
573+ ImGui::Text (" RMS: %.1f dB" , synth->mixer .rms_level );
578574
579575 ImGui::Separator ();
580576 }
0 commit comments