From: Jean-Baptiste Mardelle Date: Sat, 30 Jul 2011 19:18:11 +0000 (+0000) Subject: Preview monitor volume should not affect rendering: X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=d0da2f4236e68d6fd694790a3520fb271cdd6825;p=kdenlive Preview monitor volume should not affect rendering: http://kdenlive.org/mantis/view.php?id=2254 svn path=/trunk/kdenlive/; revision=5813 --- diff --git a/src/kdenlivedoc.cpp b/src/kdenlivedoc.cpp index 8d08faad..8fb4b376 100644 --- a/src/kdenlivedoc.cpp +++ b/src/kdenlivedoc.cpp @@ -566,6 +566,18 @@ QDomDocument KdenliveDoc::xmlSceneList(const QString &scene, const QStringList e return sceneList; } + // Set playlist audio volume to 100% + QDomElement tractor = mlt.firstChildElement("tractor"); + if (!tractor.isNull()) { + QDomNodeList props = tractor.elementsByTagName("property"); + for (int i = 0; i < props.count(); i++) { + if (props.at(i).toElement().attribute("name") == "meta.volume") { + props.at(i).firstChild().setNodeValue("1"); + break; + } + } + } + QDomElement addedXml = sceneList.createElement("kdenlivedoc"); mlt.appendChild(addedXml); diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index ccda3a2c..4b534f62 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -3884,11 +3884,23 @@ void MainWindow::slotPrepareRendering(bool scriptExport, bool zoneOnly, const QS if (m_renderWidget->automaticAudioExport()) { exportAudio = m_activeTimeline->checkProjectAudio(); } else exportAudio = m_renderWidget->selectedAudioExport(); + + // Set playlist audio volume to 100% + QDomDocument doc; + doc.setContent(playlistContent); + QDomElement tractor = doc.documentElement().firstChildElement("tractor"); + if (!tractor.isNull()) { + QDomNodeList props = tractor.elementsByTagName("property"); + for (int i = 0; i < props.count(); i++) { + if (props.at(i).toElement().attribute("name") == "meta.volume") { + props.at(i).firstChild().setNodeValue("1"); + break; + } + } + } // Do we want proxy rendering if (m_projectList->useProxy() && !m_renderWidget->proxyRendering()) { - QDomDocument doc; - doc.setContent(playlistContent); QString root = doc.documentElement().attribute("root"); // replace proxy clips with originals @@ -3932,8 +3944,8 @@ void MainWindow::slotPrepareRendering(bool scriptExport, bool zoneOnly, const QS playlistContent.replace(key, i.value()); } }*/ - playlistContent = doc.toString(); } + playlistContent = doc.toString(); // Do save scenelist QFile file(playlistPath);