diff options
author | David Robillard <d@drobilla.net> | 2009-05-07 06:30:50 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-05-07 06:30:50 +0000 |
commit | 7183242b8c8d9296f94a035fb66b1eae06fd3496 (patch) | |
tree | ee48e2019f2330baee7c280090a48e43336682b3 /libs/ardour/processor.cc | |
parent | 97b5eb1580d53197dc93a805d1995b82660cdfe3 (diff) |
The great audio processing overhaul.
The vast majority of Route signal processing is now simply in the list of
processors. There are definitely regressions here, but there's also
a lot of things fixed. It's far too much work to let diverge anymore
regardless, so here it is.
The basic model is: A route has a fixed set of input channels (matching
its JACK input ports and diskstream). The first processor takes this
as input. The next processor is configured using the first processor's
output as input, and is allowed to choose whatever output it wants
given that input... and so on, and so on. Finally, the last processor's
requested output is used to set up the panner and create whatever Jack
ports are needed to output the data.
All 'special' internal processors (meter, fader, amp, insert, send) are
currently transparent: they read any input, and return the same set
of channels back (unmodified, except for amp).
User visible changes:
* LV2 Instrument support (tracks with both MIDI and audio channels)
* MIDI in/out plugin support
* Generic plugin replication (for MIDI plugins, MIDI/audio plugins)
* Movable meter point
Known Bugs:
* Things seem to get weird on loaded sessions
* Output delivery is sketchy
* 2.0 session loading was probably already broken...
but it's definitely broken now :)
Please test this and file bugs if you have any time...
git-svn-id: svn://localhost/ardour2/branches/3.0@5055 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/processor.cc')
-rw-r--r-- | libs/ardour/processor.cc | 65 |
1 files changed, 16 insertions, 49 deletions
diff --git a/libs/ardour/processor.cc b/libs/ardour/processor.cc index 63848e8c40..b48b0aebb0 100644 --- a/libs/ardour/processor.cc +++ b/libs/ardour/processor.cc @@ -58,13 +58,12 @@ sigc::signal<void,Processor*> Processor::ProcessorCreated; // Always saved as Processor, but may be IOProcessor or Send in legacy sessions const string Processor::state_node_name = "Processor"; -Processor::Processor(Session& session, const string& name, Placement p) +Processor::Processor(Session& session, const string& name) : SessionObject(session, name) , AutomatableControls(session) , _active(false) , _next_ab_is_active(false) , _configured(false) - , _placement(p) , _gui(0) { } @@ -75,15 +74,6 @@ Processor::set_sort_key (uint32_t key) _sort_key = key; } -void -Processor::set_placement (Placement p) -{ - if (_placement != p) { - _placement = p; - PlacementChanged (); /* EMIT SIGNAL */ - } -} - XMLNode& Processor::get_state (void) { @@ -120,26 +110,28 @@ Processor::state (bool full_state) node->add_property("name", _name); node->add_property("active", active() ? "yes" : "no"); - node->add_property("placement", enum_2_string (_placement)); if (_extra_xml){ node->add_child_copy (*_extra_xml); } if (full_state) { - XMLNode& automation = Automatable::get_automation_state(); - - for (set<Evoral::Parameter>::iterator x = _visible_controls.begin(); x != _visible_controls.end(); ++x) { - if (x != _visible_controls.begin()) { - sstr << ' '; + if (!automation.children().empty() + || !automation.properties().empty() + || !_visible_controls.empty()) { + + for (set<Evoral::Parameter>::iterator x = _visible_controls.begin(); + x != _visible_controls.end(); ++x) { + if (x != _visible_controls.begin()) { + sstr << ' '; + } + sstr << *x; } - sstr << *x; - } - - automation.add_property ("visible", sstr.str()); - node->add_child_nocopy (automation); + automation.add_property ("visible", sstr.str()); + node->add_child_nocopy (automation); + } } return *node; @@ -164,7 +156,6 @@ Processor::set_state (const XMLNode& node) if ((*niter)->name() == X_("Automation")) { - XMLProperty *prop; if ((prop = (*niter)->property ("path")) != 0) { @@ -203,7 +194,8 @@ Processor::set_state (const XMLNode& node) } if ((prop = node.property ("active")) == 0) { - warning << _("XML node describing a processor is missing the `active' field, trying legacy active flag from child node") << endmsg; + warning << _("XML node describing a processor is missing the `active' field," + "trying legacy active flag from child node") << endmsg; if (legacy_active) { prop = legacy_active; } else { @@ -217,31 +209,6 @@ Processor::set_state (const XMLNode& node) ActiveChanged (); /* EMIT_SIGNAL */ } - if ((prop = node.property ("placement")) == 0) { - warning << _("XML node describing a processor is missing the `placement' field, trying legacy placement flag from child node") << endmsg; - if (legacy_placement) { - prop = legacy_placement; - } else { - error << _("No child node with placement property") << endmsg; - return -1; - } - } - - /* hack to handle older sessions before we only used EnumWriter */ - - string pstr; - - if (prop->value() == "pre") { - pstr = "PreFader"; - } else if (prop->value() == "post") { - pstr = "PostFader"; - } else { - pstr = prop->value(); - } - - Placement p = Placement (string_2_enum (pstr, p)); - set_placement (p); - return 0; } |