X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fladspa_plugin.cc;h=cc532c61ca151f077a3168e08044c936808b0607;hb=ad547e53fc168410b22628a8cb125e8d4da4b293;hp=a242a76c3189880e8601b2d0f542ca614df79f4b;hpb=57e1358fb2d8a8ab51b4996808e0eaa41492fb9e;p=ardour.git diff --git a/libs/ardour/ladspa_plugin.cc b/libs/ardour/ladspa_plugin.cc index a242a76c31..cc532c61ca 100644 --- a/libs/ardour/ladspa_plugin.cc +++ b/libs/ardour/ladspa_plugin.cc @@ -144,8 +144,6 @@ LadspaPlugin::~LadspaPlugin () deactivate (); cleanup (); - GoingAway (); /* EMIT SIGNAL */ - /* XXX who should close a plugin? */ // dlclose (module); @@ -180,8 +178,6 @@ LadspaPlugin::default_value (uint32_t port) sr_scaling = true; } - /* FIXME: add support for logarithmic defaults */ - else if (LADSPA_IS_HINT_DEFAULT_LOW(prh[port].HintDescriptor)) { if (LADSPA_IS_HINT_LOGARITHMIC(prh[port].HintDescriptor)) { ret = exp(log(prh[port].LowerBound) * 0.75f + log(prh[port].UpperBound) * 0.25f); @@ -427,7 +423,7 @@ LadspaPlugin::set_state (const XMLNode& node, int version) } int -LadspaPlugin::set_state_2X (const XMLNode& node, int version) +LadspaPlugin::set_state_2X (const XMLNode& node, int /* version */) { XMLNodeList nodes; XMLProperty *prop; @@ -638,6 +634,9 @@ LadspaPlugin::run_in_place (nframes_t nframes) _control_data[i] = _shadow_data[i]; } } + + assert (_was_activated); + _descriptor->run (_handle, nframes); } @@ -695,6 +694,7 @@ LadspaPluginInfo::load (Session& session) if ((module = dlopen (path.c_str(), RTLD_NOW)) == 0) { error << string_compose(_("LADSPA: cannot load module from \"%1\""), path) << endmsg; error << dlerror() << endmsg; + return PluginPtr ((Plugin*) 0); } else { plugin.reset (new LadspaPlugin (module, session.engine(), session, index, session.frame_rate())); } @@ -707,3 +707,8 @@ LadspaPluginInfo::load (Session& session) return PluginPtr ((Plugin*) 0); } } + +LadspaPluginInfo::LadspaPluginInfo() +{ + type = ARDOUR::LADSPA; +}