Commit d84fa82f authored by Jean-Baptiste Mardelle's avatar Jean-Baptiste Mardelle
Browse files

After audio recording, correctly seek to last frame of record in timeline

parent a5fae71b
Pipeline #175720 passed with stage
in 9 minutes and 46 seconds
......@@ -4510,12 +4510,15 @@ void TimelineController::finishRecording(const QString &recordedFile)
qDebug() << "callback " << binId << " " << m_recordTrack << ", MAXIMUM SPACE: " << m_recordStart.second;
if (m_recordStart.second > 0) {
// Limited space on track
int out = qMin(int(clip->frameDuration() - 1), m_recordStart.second - 1);
QString binClipId = QString("%1/%2/%3").arg(binId).arg(0).arg(out);
m_recordStart.second = qMin(int(clip->frameDuration() - 1), m_recordStart.second);
QString binClipId = QString("%1/%2/%3").arg(binId).arg(0).arg(m_recordStart.second);
m_model->requestClipInsertion(binClipId, m_recordTrack, m_recordStart.first, id, true, true, false);
m_recordStart.second++;
} else {
m_recordStart.second = clip->frameDuration();
m_model->requestClipInsertion(binId, m_recordTrack, m_recordStart.first, id, true, true, false);
}
setPosition(m_recordStart.first + m_recordStart.second);
};
QString binId =
ClipCreator::createClipFromFile(recordedFile, pCore->projectItemModel()->getRootFolder()->clipId(), pCore->projectItemModel(), undo, redo, callBack);
......
  • I think the playhead should always move while recording. Here a screengrab what I mean with this comment a5fae71b (comment 448581). recording

    Edited by Eugen Mohr
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment