- if (static_cast<bool>(_analysis->sample_peak ())) {
-
- float const peak_dB = 20 * log10 (_analysis->sample_peak().get()) + _analysis->gain_correction (_playlist);
-
- _sample_peak->SetLabel (
- wxString::Format (
- _("Sample peak is %.2fdB at %s"),
- peak_dB,
- time_to_timecode (_analysis->sample_peak_time().get(), film->video_frame_rate ()).data ()
- )
- );
-
- if (peak_dB > -3) {
- _sample_peak->SetForegroundColour (wxColour (255, 0, 0));
- } else {
- _sample_peak->SetForegroundColour (wxColour (0, 0, 0));
- }
+ pair<AudioAnalysis::PeakTime, int> const peak = _analysis->overall_sample_peak ();
+ float const peak_dB = 20 * log10 (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 ()
+ )
+ );
+
+ if (peak_dB > -3) {
+ _sample_peak->SetForegroundColour (wxColour (255, 0, 0));
+ } else {
+ _sample_peak->SetForegroundColour (wxColour (0, 0, 0));