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

Fix audio mixer track effects applied twice when reopening project, leading to incorrect volume.

Fixes #792
parent 9a94ca4e
Pipeline #36222 passed with stage
in 12 minutes and 10 seconds
...@@ -200,7 +200,7 @@ void MixerWidget::buildUI(Mlt::Tractor *service, const QString &trackTag) ...@@ -200,7 +200,7 @@ void MixerWidget::buildUI(Mlt::Tractor *service, const QString &trackTag)
m_monitorFilter->set("disable", 0); m_monitorFilter->set("disable", 0);
} else if (filterService == QLatin1String("volume")) { } else if (filterService == QLatin1String("volume")) {
m_levelFilter = fl; m_levelFilter = fl;
int volume = m_levelFilter->get_int("level"); double volume = m_levelFilter->get_double("level");
m_volumeSpin->setValue(volume); m_volumeSpin->setValue(volume);
m_volumeSlider->setValue(fromDB(volume)); m_volumeSlider->setValue(fromDB(volume));
} else if (filterService == QLatin1String("panner")) { } else if (filterService == QLatin1String("panner")) {
......
...@@ -916,7 +916,8 @@ void EffectStackModel::importEffects(const std::weak_ptr<Mlt::Service> &service, ...@@ -916,7 +916,8 @@ void EffectStackModel::importEffects(const std::weak_ptr<Mlt::Service> &service,
int imported = 0; int imported = 0;
for (int i = 0; i < max; i++) { for (int i = 0; i < max; i++) {
std::unique_ptr<Mlt::Filter> filter(ptr->filter(i)); std::unique_ptr<Mlt::Filter> filter(ptr->filter(i));
if (filter->get_int("internal_added") > 0) { if (filter->get_int("internal_added") > 0 && m_ownerId.first != ObjectType::TimelineTrack) {
// Required to load master audio effects
if (auto ms = m_masterService.lock()) { if (auto ms = m_masterService.lock()) {
ms->attach(*filter.get()); ms->attach(*filter.get());
} }
......
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