+ auto const peak = _analysis->overall_sample_peak ();
+ float const peak_dB = linear_to_db(peak.first.peak) + _analysis->gain_correction(_playlist);
+ _sample_peak->SetLabel (
+ wxString::Format (
+ _("Sample peak is %.2fdB at %s on %s"),
+ peak_dB,
+ time_to_timecode (peak.first.time, film->video_frame_rate ()).data (),
+ std_to_wx (short_audio_channel_name (peak.second)).data ()
+ )
+ );
+
+ wxColour const peaking = *wxRED;
+ wxColour const not_peaking = gui_is_dark() ? *wxWHITE : *wxBLACK;
+
+ if (peak_dB > -3) {
+ _sample_peak->SetForegroundColour(peaking);
+ } else {
+ _sample_peak->SetForegroundColour(not_peaking);
+ }