Disable audio monitor filters on save

parent 81a54b54
Pipeline #16226 passed with stage
in 14 minutes and 3 seconds
......@@ -223,3 +223,13 @@ QSize MixerManager::sizeHint() const
{
return QSize(m_recommandedWidth, 0);
}
void MixerManager::pauseMonitoring(bool pause)
{
for (auto item : m_mixers) {
item.second->pauseMonitoring(pause);
}
if (m_masterMixer != nullptr) {
m_masterMixer->pauseMonitoring(pause);
}
}
......@@ -52,6 +52,8 @@ public:
/** @brief Connect the mixer widgets to the correspondant filters */
void connectMixer(bool doConnect);
void collapseMixers();
/** @brief Pause/unpause audio monitoring */
void pauseMonitoring(bool pause);
public slots:
void recordStateChanged(int tid, bool recording);
......
......@@ -179,6 +179,7 @@ void MixerWidget::buildUI(Mlt::Tractor *service, const QString &trackTag)
const QString filterService = fl->get("mlt_service");
if (filterService == QLatin1String("audiolevel")) {
m_monitorFilter = fl;
m_monitorFilter->set("disable", 0);
} else if (filterService == QLatin1String("volume")) {
m_levelFilter = fl;
int volume = m_levelFilter->get_int("level");
......@@ -490,3 +491,10 @@ void MixerWidget::connectMixer(bool doConnect)
m_listener = nullptr;
}
}
void MixerWidget::pauseMonitoring(bool pause)
{
if (m_monitorFilter) {
m_monitorFilter->set("disable", pause ? 1 : 0);
}
}
......@@ -68,6 +68,8 @@ public:
void unSolo();
/** @brief Connect the mixer widgets to the correspondant filters */
void connectMixer(bool doConnect);
/** @brief Disable/enable monitoring by disabling/enabling filter */
void pauseMonitoring(bool pause);
protected:
void mousePressEvent(QMouseEvent *event) override;
......
......@@ -666,7 +666,9 @@ QString ProjectManager::projectSceneList(const QString &outputFolder)
if (hasPreview) {
pCore->window()->getMainTimeline()->controller()->updatePreviewConnection(false);
}
pCore->mixer()->pauseMonitoring(true);
QString scene = pCore->monitorManager()->projectMonitor()->sceneList(outputFolder);
pCore->mixer()->pauseMonitoring(false);
if (isMultiTrack) {
pCore->window()->getMainTimeline()->controller()->slotMultitrackView(true, false);
}
......
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