13
0

Merge two methods.

git-svn-id: svn://localhost/ardour2/branches/3.0@8671 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2011-02-01 23:20:58 +00:00
parent 7be6ddbd5a
commit 6c7d8c6877
2 changed files with 6 additions and 13 deletions

View File

@ -235,7 +235,6 @@ class Route : public SessionObject, public Automatable, public RouteGroupMember,
int add_processor (boost::shared_ptr<Processor>, Placement placement, ProcessorStreams* err = 0); int add_processor (boost::shared_ptr<Processor>, Placement placement, ProcessorStreams* err = 0);
int add_processor (boost::shared_ptr<Processor>, ProcessorList::iterator iter, ProcessorStreams* err = 0, bool activation_allowed = true); int add_processor (boost::shared_ptr<Processor>, ProcessorList::iterator iter, ProcessorStreams* err = 0, bool activation_allowed = true);
int add_processors (const ProcessorList&, boost::shared_ptr<Processor> before, ProcessorStreams* err = 0); int add_processors (const ProcessorList&, boost::shared_ptr<Processor> before, ProcessorStreams* err = 0);
int add_processors (const ProcessorList&, ProcessorList::iterator iter, ProcessorStreams* err = 0);
int remove_processor (boost::shared_ptr<Processor>, ProcessorStreams* err = 0); int remove_processor (boost::shared_ptr<Processor>, ProcessorStreams* err = 0);
int remove_processors (const ProcessorList&, ProcessorStreams* err = 0); int remove_processors (const ProcessorList&, ProcessorStreams* err = 0);
int reorder_processors (const ProcessorList& new_order, ProcessorStreams* err = 0); int reorder_processors (const ProcessorList& new_order, ProcessorStreams* err = 0);

View File

@ -1014,6 +1014,11 @@ Route::add_processor_from_xml_2X (const XMLNode& node, int version)
int int
Route::add_processors (const ProcessorList& others, boost::shared_ptr<Processor> before, ProcessorStreams* err) Route::add_processors (const ProcessorList& others, boost::shared_ptr<Processor> before, ProcessorStreams* err)
{ {
/* NOTE: this is intended to be used ONLY when copying
processors from another Route. Hence the subtle
differences between this and ::add_processor()
*/
ProcessorList::iterator loc; ProcessorList::iterator loc;
if (before) { if (before) {
@ -1023,17 +1028,6 @@ Route::add_processors (const ProcessorList& others, boost::shared_ptr<Processor>
loc = find (_processors.begin(), _processors.end(), _main_outs); loc = find (_processors.begin(), _processors.end(), _main_outs);
} }
return add_processors (others, loc, err);
}
int
Route::add_processors (const ProcessorList& others, ProcessorList::iterator iter, ProcessorStreams* err)
{
/* NOTE: this is intended to be used ONLY when copying
processors from another Route. Hence the subtle
differences between this and ::add_processor()
*/
ChanCount old_pms = processor_max_streams; ChanCount old_pms = processor_max_streams;
if (!_session.engine().connected()) { if (!_session.engine().connected()) {
@ -1071,7 +1065,7 @@ Route::add_processors (const ProcessorList& others, ProcessorList::iterator iter
} }
} }
ProcessorList::iterator inserted = _processors.insert (iter, *i); ProcessorList::iterator inserted = _processors.insert (loc, *i);
if ((*i)->active()) { if ((*i)->active()) {
(*i)->activate (); (*i)->activate ();