}
item->initEffect(effect);
- // Old LADSPA filter, deprecated
- /*
- if (effect.attribute("tag") == "ladspa") {
- QString ladpsaFile = m_document->getLadspaFile();
- initEffects::ladspaEffectFile(ladpsaFile, effect.attribute("ladspaid").toInt(), getLadspaParams(effect));
- effect.setAttribute("src", ladpsaFile);
- }*/
new AddEffectCommand(this, m_document->tracksCount() - item->track(), item->startPos(), effect, true, effectCommand);
count++;
}
} else {
item->initEffect(effect);
}
- // Old LADSPA filter, deprecated
- /* if (effect.attribute("tag") == "ladspa") {
- QString ladpsaFile = m_document->getLadspaFile();
- initEffects::ladspaEffectFile(ladpsaFile, effect.attribute("ladspaid").toInt(), getLadspaParams(effect));
- effect.setAttribute("src", ladpsaFile);
- }
- */
new AddEffectCommand(this, m_document->tracksCount() - item->track(), item->startPos(), effect, true, effectCommand);
}
}
if (pos < GenTime()) {
// editing a track effect
EffectsParameterList effectParams = getEffectArgs(effect);
- // Old LADSPA filter, deprecated
- /*if (effect.attribute("tag") == "ladspa") {
- // Update the ladspa affect file
- initEffects::ladspaEffectFile(effect.attribute("src"), effect.attribute("ladspaid").toInt(), getLadspaParams(effect));
- }*/
// check if we are trying to reset a keyframe effect
/*if (effectParams.hasParam("keyframes") && effectParams.paramValue("keyframes").isEmpty()) {
clip->initEffect(effect);
}
EffectsParameterList effectParams = getEffectArgs(effect);
- // Old LADSPA filter, deprecated
- /*if (effect.attribute("tag") == "ladspa") {
- // Update the ladspa affect file
- initEffects::ladspaEffectFile(effect.attribute("src"), effect.attribute("ladspaid").toInt(), getLadspaParams(effect));
- }*/
// check if we are trying to reset a keyframe effect
if (effectParams.hasParam("keyframes") && effectParams.paramValue("keyframes").isEmpty()) {
clip->initEffect(effect);
setDocumentModified();
}
-
-QStringList CustomTrackView::getLadspaParams(QDomElement effect) const
-{
- QStringList result;
- QLocale locale;
- QDomNodeList params = effect.elementsByTagName("parameter");
- for (int i = 0; i < params.count(); i++) {
- QDomElement e = params.item(i).toElement();
- if (!e.isNull() && e.attribute("type") == "constant") {
- if (e.hasAttribute("factor")) {
- double factor = e.attribute("factor").toDouble();
- double value = e.attribute("value").toDouble();
- value = value / factor;
- result.append(locale.toString(value));
- } else result.append(e.attribute("value"));
- }
- }
- return result;
-}
-
void CustomTrackView::clipNameChanged(const QString id, const QString name)
{
QList<QGraphicsItem *> list = scene()->items();