Audio mixer cleanup

parent 13d52b03
Pipeline #8910 passed with stage
in 17 minutes and 19 seconds
......@@ -68,14 +68,6 @@ void MixerManager::registerTrack(int tid, std::shared_ptr<Mlt::Tractor> service,
m_model->setTrackProperty(id, "hide", mute ? QStringLiteral("1") : QStringLiteral("3"));
});
connect(this, &MixerManager::updateLevels, mixer.get(), &MixerWidget::updateAudioLevel);
connect(mixer.get(), &MixerWidget::updateConnection, [&](int id, bool doConnect) {
//connect(this, &MixerManager::storeLevels, m_mixers[id].get(), &MixerWidget::storeAudioLevel, Qt::DirectConnection);
m_connectedWidgets++;
if (m_connectedWidgets == 1) {
emit connectMixerRenderer(true);
}
});
connect(mixer.get(), &MixerWidget::toggleSolo, [&](int trid, bool solo) {
if (!solo) {
// unmute
......@@ -159,13 +151,6 @@ void MixerManager::setModel(std::shared_ptr<TimelineItemModel> model)
m_model->tractor()->set("hide", mute ? 3 : 1);
});
connect(this, &MixerManager::updateLevels, mixer.get(), &MixerWidget::updateAudioLevel);
connect(mixer.get(), &MixerWidget::updateConnection, [&](int id, bool doConnect) {
//connect(this, &MixerManager::storeLevels, m_mixers[id].get(), &MixerWidget::storeAudioLevel, Qt::DirectConnection);
m_connectedWidgets++;
if (m_connectedWidgets == 1) {
emit connectMixerRenderer(true);
}
});
m_mixers[tid] = mixer;
m_box->insertWidget(0, mixer.get());
}
......
......@@ -228,7 +228,6 @@ void MixerWidget::buildUI(Mlt::Tractor *service, const QString &trackTag)
if (service->get_int("hide") > 1) {
setMute(true);
}
QMetaObject::invokeMethod(this, "updateConnection", Qt::QueuedConnection, Q_ARG(int, m_tid), Q_ARG(bool, true));
m_monitorFilter->listen("property-changed", this, (mlt_listener)property_changed);
}
......
......@@ -84,7 +84,6 @@ private:
int m_lastVolume;
signals:
void updateConnection(int, bool);
void gotLevels(QPair <double, double>);
void muteTrack(int tid, bool mute);
void toggleSolo(int m_tid, bool toggled);
......
......@@ -176,7 +176,6 @@ void Core::initGUI(const QUrl &Url)
connect(m_library, SIGNAL(addProjectClips(QList<QUrl>)), m_binWidget, SLOT(droppedUrls(QList<QUrl>)));
connect(this, &Core::updateLibraryPath, m_library, &LibraryWidget::slotUpdateLibraryPath);
m_monitorManager = new MonitorManager(this);
connect(m_mixerWidget, &MixerManager::connectMixerRenderer, m_monitorManager, &MonitorManager::connectMixerRenderer);
connect(m_monitorManager, &MonitorManager::pauseTriggered, m_mixerWidget, &MixerManager::resetAudioValues);
// Producer queue, creating MLT::Producers on request
/*
......
......@@ -1346,15 +1346,6 @@ float GLWidget::zoom() const
return m_zoom;
}
void GLWidget::connectMixerRenderer(bool doConnect)
{
if (doConnect) {
m_renderEvent = m_consumer->listen("consumer-frame-render", this, (mlt_listener)on_frame_render);
} else {
delete m_renderEvent;
}
}
float GLWidget::scale() const
{
return (double)m_rect.width() / pCore->getCurrentProfile()->width() * m_zoom;
......
......@@ -161,8 +161,6 @@ public slots:
void initializeGL();
void releaseAnalyse();
void switchPlay(bool play, double speed = 1.0);
/** @brief Connect the frame rendering to audio mixer */
void connectMixerRenderer(bool connect);
signals:
void frameDisplayed(const SharedFrame &frame);
......
......@@ -213,7 +213,6 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *paren
m_toolbar->setToolTip(i18n("Insert Zone to Project Bin"));
m_toolbar->addSeparator();
} else if (id == Kdenlive::ProjectMonitor) {
connect(manager, &MonitorManager::connectMixerRenderer, m_glMonitor, &GLWidget::connectMixerRenderer);
connect(m_glMonitor, &GLWidget::paused, m_monitorManager, &MonitorManager::pauseTriggered);
}
......
......@@ -149,8 +149,6 @@ signals:
void frameDisplayed(const SharedFrame &);
/** @brief A frame was processed in the consumer queue */
void frameRendered(int);
/** @brief Connect the frame rendering to audio mixer */
void connectMixerRenderer(bool connect);
/** @brief Triggered when the project monitor is paused (used to reset stored audiomixer data */
void pauseTriggered();
};
......
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