Skip to content

Commit

Permalink
show status message for Record Audio
Browse files Browse the repository at this point in the history
  • Loading branch information
ddennedy committed Dec 26, 2024
1 parent b6f3a18 commit e9cd066
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/docks/timelinedock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@
#include <QGuiApplication>
#include <QClipboard>
#include <Logger.h>
#include <qprogressbar.h>
#include <qwidgetaction.h>

static const char *kFileUrlProtocol = "file://";
static const char *kFilesUrlDelimiter = ",file://";
Expand Down Expand Up @@ -3889,14 +3891,18 @@ void TimelineDock::onRecordStarted()

void TimelineDock::updateRecording()
{
int out = qRound(MLT.profile().fps() * m_recordingTime.secsTo(QDateTime::currentDateTime()));
auto info = m_model.getClipInfo(m_recordingTrackIndex, m_recordingClipIndex);
const auto seconds = m_recordingTime.secsTo(QDateTime::currentDateTime());
const auto out = qRound(MLT.profile().fps() * seconds);
const auto info = m_model.getClipInfo(m_recordingTrackIndex, m_recordingClipIndex);
if (info) {
auto delta = info->frame_out - out;
if (delta < 0) {
m_model.trimClipOut(m_recordingTrackIndex, m_recordingClipIndex, delta, false, false);
}
}
if (seconds % 3 == 1) {
MAIN.showStatusMessage(tr("Audio Recording In Progress"), 2);
}
}

void TimelineDock::onRecordFinished(AbstractJob *, bool success)
Expand Down

0 comments on commit e9cd066

Please sign in to comment.