From 3a711840409d7821d12112401474eed69e6083ab Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Sat, 22 Aug 2020 18:12:12 +0100 Subject: [PATCH] Include period start time in dropped samples message box details --- widgets/mainwindow.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index a34d35082..6a9d63fed 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -480,10 +480,14 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, } if (dropped_frames > 48000) // 1 second { + auto period = qt_truncate_date_time_to (QDateTime::currentDateTimeUtc ().addMSecs (-m_TRperiod / 2.), m_TRperiod * 1e3); MessageBox::warning_message (this , tr ("Audio Source") , tr ("Reduce system load") - , tr ("Excessive dropped samples - %1 (%2 sec) audio frames dropped").arg (dropped_frames).arg (usec / 1.e6, 5, 'f', 3)); + , tr ("Excessive dropped samples - %1 (%2 sec) audio frames dropped in period starting %3") + .arg (dropped_frames) + .arg (usec / 1.e6, 5, 'f', 3) + .arg (period.toString ("hh:mm:ss"))); } }); connect (&m_audioThread, &QThread::finished, m_soundInput, &QObject::deleteLater);