mirror of https://github.com/saitohirga/WSJT-X.git
Tidy dropped frame status bar message
This commit is contained in:
parent
02e19b687f
commit
2e413713a3
|
@ -163,6 +163,7 @@ void SoundInput::reset (bool report_dropped_frames)
|
||||||
{
|
{
|
||||||
auto lost_usec = m_stream->elapsedUSecs () - m_stream->processedUSecs () - cummulative_lost_usec_;
|
auto lost_usec = m_stream->elapsedUSecs () - m_stream->processedUSecs () - cummulative_lost_usec_;
|
||||||
Q_EMIT dropped_frames (m_stream->format ().framesForDuration (lost_usec), lost_usec);
|
Q_EMIT dropped_frames (m_stream->format ().framesForDuration (lost_usec), lost_usec);
|
||||||
|
qDebug () << "SoundInput::reset: frames dropped:" << m_stream->format ().framesForDuration (lost_usec) << "sec:" << lost_usec / 1.e6;
|
||||||
}
|
}
|
||||||
cummulative_lost_usec_ = m_stream->elapsedUSecs () - m_stream->processedUSecs ();
|
cummulative_lost_usec_ = m_stream->elapsedUSecs () - m_stream->processedUSecs ();
|
||||||
}
|
}
|
||||||
|
|
|
@ -474,7 +474,7 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
|
||||||
connect(m_soundInput, &SoundInput::error, this, &MainWindow::showSoundInError);
|
connect(m_soundInput, &SoundInput::error, this, &MainWindow::showSoundInError);
|
||||||
// connect(m_soundInput, &SoundInput::status, this, &MainWindow::showStatusMessage);
|
// connect(m_soundInput, &SoundInput::status, this, &MainWindow::showStatusMessage);
|
||||||
connect (m_soundInput, &SoundInput::dropped_frames, this, [this] (qint32 dropped_frames, qint64 usec) {
|
connect (m_soundInput, &SoundInput::dropped_frames, this, [this] (qint32 dropped_frames, qint64 usec) {
|
||||||
showStatusMessage (tr ("%1 (%2 sec) audio frames dropped").arg (dropped_frames).arg (usec / 1.e6));
|
showStatusMessage (tr ("%1 (%2 sec) audio frames dropped").arg (dropped_frames).arg (usec / 1.e6, 5, 'f', 3));
|
||||||
});
|
});
|
||||||
connect (&m_audioThread, &QThread::finished, m_soundInput, &QObject::deleteLater);
|
connect (&m_audioThread, &QThread::finished, m_soundInput, &QObject::deleteLater);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue