]> git.sesse.net Git - kdenlive/blobdiff - src/trackview.cpp
Make sox effects work again, part of bug:
[kdenlive] / src / trackview.cpp
index d87a0d7b7a7a9914420a46f1e1545689dbdf3def..e5e920d5880c4eaa5fc02dc2ea18854df41b6e2e 100644 (file)
@@ -513,12 +513,16 @@ int TrackView::slotAddProjectTrack(int ix, QDomElement xml) {
                                 QString paramname = effectparam.attribute("name");
                                 QString paramvalue = effectparam.text();
 
+
                                 // try to find this parameter in the effect xml
                                 QDomElement e;
                                 for (int k = 0; k < clipeffectparams.count(); k++) {
                                     e = clipeffectparams.item(k).toElement();
                                     if (!e.isNull() && e.tagName() == "parameter" && e.attribute("name") == paramname) {
-                                        e.setAttribute("value", paramvalue);
+                                        double factor = e.attribute("factor", "1").toDouble();
+                                        if (factor != 1) {
+                                            e.setAttribute("value", paramvalue.toDouble() * factor);
+                                        } else e.setAttribute("value", paramvalue);
                                         break;
                                     }
                                 }