plugins use their route's automation time domain

This commit is contained in:
Paul Davis
2021-01-13 10:47:08 -07:00
parent cd59f876f7
commit 495cc1e4bc
7 changed files with 15 additions and 15 deletions

View File

@@ -59,7 +59,7 @@ class Plugin;
class LIBARDOUR_API PluginInsert : public Processor
{
public:
PluginInsert (Session&, boost::shared_ptr<Plugin> = boost::shared_ptr<Plugin>());
PluginInsert (Session&, Temporal::TimeDomain td, boost::shared_ptr<Plugin> = boost::shared_ptr<Plugin>());
~PluginInsert ();
void drop_references ();

View File

@@ -78,7 +78,7 @@ Auditioner::init ()
if (!audition_synth_info) {
lookup_fallback_synth ();
}
}
_output->changed.connect_same_thread (*this, boost::bind (&Auditioner::output_changed, this, _1, _2));
@@ -107,7 +107,7 @@ Auditioner::lookup_fallback_synth_plugin_info (std::string const& uri) const
void
Auditioner::lookup_fallback_synth ()
{
PluginInfoPtr nfo = lookup_fallback_synth_plugin_info ("http://gareus.org/oss/lv2/gmsynth");
//GMsynth not found: fallback to Reasonable Synth
@@ -138,10 +138,10 @@ Auditioner::load_synth (bool need_lock)
if (!audition_synth_info) {
return;
}
boost::shared_ptr<Plugin> p = audition_synth_info->load (_session);
if (p) {
asynth = boost::shared_ptr<Processor> (new PluginInsert (_session, p));
asynth = boost::shared_ptr<Processor> (new PluginInsert (_session, time_domain(), p));
}
}
@@ -608,4 +608,3 @@ Auditioner::monitoring_state () const
{
return MonitoringDisk;
}

View File

@@ -108,7 +108,8 @@ ARDOUR::LuaAPI::new_luaproc (Session *s, const string& name)
return boost::shared_ptr<Processor> ();
}
return boost::shared_ptr<Processor> (new PluginInsert (*s, p));
#warning NUTEMPO caller should be able to control time domain
return boost::shared_ptr<Processor> (new PluginInsert (*s, Config->get_default_automation_time_domain(), p));
}
boost::shared_ptr<Processor>
@@ -231,7 +232,8 @@ ARDOUR::LuaAPI::new_plugin (Session *s, const string& name, ARDOUR::PluginType t
}
}
return boost::shared_ptr<Processor> (new PluginInsert (*s, p));
#warning NUTEMPO caller should be able to control time domain
return boost::shared_ptr<Processor> (new PluginInsert (*s, Config->get_default_automation_time_domain(), p));
}
bool

View File

@@ -75,9 +75,8 @@ using namespace PBD;
const string PluginInsert::port_automation_node_name = "PortAutomation";
PluginInsert::PluginInsert (Session& s, boost::shared_ptr<Plugin> plug)
#warning NUTEMPO why audio time when this processor can handle MIDI also
: Processor (s, (plug ? plug->name() : string ("toBeRenamed")), Temporal::AudioTime)
PluginInsert::PluginInsert (Session& s, Temporal::TimeDomain td, boost::shared_ptr<Plugin> plug)
: Processor (s, (plug ? plug->name() : string ("toBeRenamed")), td)
, _sc_playback_latency (0)
, _sc_capture_latency (0)
, _plugin_signal_latency (0)

View File

@@ -945,7 +945,7 @@ Route::add_processor_from_xml_2X (const XMLNode& node, int version)
if (_session.get_disable_all_loaded_plugins ()) {
processor.reset (new UnknownProcessor (_session, node));
} else {
processor.reset (new PluginInsert (_session));
processor.reset (new PluginInsert (_session, time_domain()));
processor->set_owner (this);
}
@@ -3215,7 +3215,7 @@ Route::set_processor_state (XMLNode const& node, int version, XMLProperty const*
if (_session.get_disable_all_loaded_plugins ()) {
processor.reset (new UnknownProcessor (_session, node));
} else {
processor.reset (new PluginInsert (_session));
processor.reset (new PluginInsert (_session, time_domain()));
processor->set_owner (this);
}
} else if (prop->value() == "port") {

View File

@@ -3432,7 +3432,7 @@ Session::load_and_connect_instruments (RouteList& new_routes, bool strict_io, bo
if (pset) {
plugin->load_preset (*pset);
}
boost::shared_ptr<PluginInsert> pi (new PluginInsert (*this, plugin));
boost::shared_ptr<PluginInsert> pi (new PluginInsert (*this, (*r)->time_domain(), plugin));
if (strict_io) {
pi->set_strict_io (true);
}

View File

@@ -91,7 +91,7 @@ LuaScriptTest::dsp_script_test ()
PluginPtr p = (*i)->load (*_session);
CPPUNIT_ASSERT_MESSAGE ((*i)->name, p);
boost::shared_ptr<Processor> processor (new PluginInsert (*_session, p));
boost::shared_ptr<Processor> processor (new PluginInsert (*_session, r->time_domain(), p));
processor->enable (true);
int rv = r->add_processor (processor, boost::shared_ptr<Processor>(), 0);