1
0
Fork 0

Adjust the peak meter normalization to -40 dBFS

This commit is contained in:
Robbert van der Helm 2022-02-06 14:58:14 +01:00
parent a95b25cd06
commit 0943d54404

View file

@ -142,8 +142,7 @@ impl Plugin for Gain {
String::from("-inf dBFS") String::from("-inf dBFS")
}; };
let peak_meter_normalized = let peak_meter_normalized = (peak_meter + 40.0) / 40.0;
(peak_meter - util::MINUS_INFINITY_DB) / -util::MINUS_INFINITY_DB;
ui.allocate_space(egui::Vec2::splat(2.0)); ui.allocate_space(egui::Vec2::splat(2.0));
ui.add( ui.add(
egui::widgets::ProgressBar::new(peak_meter_normalized) egui::widgets::ProgressBar::new(peak_meter_normalized)