diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2008-03-17 20:54:03 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2008-03-17 20:54:03 +0000 |
commit | 997e4b1f9cd7ccfc704b7c035051da7f60d831e7 (patch) | |
tree | 1236e40183b677abf4a2882e4cfe8e0a345eb24d /libs/ardour/route.cc | |
parent | 19a4b990325577fc949ccd5d5fbad4520eb1df56 (diff) |
merge with 2.0-ongoing @ rev 3147
git-svn-id: svn://localhost/ardour2/branches/3.0@3152 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r-- | libs/ardour/route.cc | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc index 560946d9da..85e849de2e 100644 --- a/libs/ardour/route.cc +++ b/libs/ardour/route.cc @@ -828,7 +828,7 @@ Route::add_processor (boost::shared_ptr<Processor> processor, ProcessorStreams* if ((pi = boost::dynamic_pointer_cast<PluginInsert>(processor)) != 0) { pi->set_count (1); - + if (pi->natural_input_streams() == ChanCount::ZERO) { /* generator plugin */ _have_internal_generator = true; @@ -1198,6 +1198,8 @@ Route::_reset_plugin_counts (ProcessorStreams* err) ProcessorList::iterator r; map<Placement,list<ProcessorCount> > processor_map; ChanCount initial_streams; + ChanCount post_fader_input; + int ret = -1; /* Process each placement in order, checking to see if we can really do what has been requested. @@ -1205,7 +1207,8 @@ Route::_reset_plugin_counts (ProcessorStreams* err) /* divide processors up by placement so we get the signal flow properly modelled. we need to do this because the _processors - list is not sorted by placement + list is not sorted by placement, and because other reasons may + exist now or in the future for this separate treatment. */ /* ... but it should/will be... */ @@ -1219,19 +1222,18 @@ Route::_reset_plugin_counts (ProcessorStreams* err) } } - /* A: PreFader */ if ( ! check_some_plugin_counts (processor_map[PreFader], n_inputs (), err)) { - return -1; + goto streamcount; } - ChanCount post_fader_input = (err ? err->count : n_inputs()); + post_fader_input = (err ? err->count : n_inputs()); /* B: PostFader */ if ( ! check_some_plugin_counts (processor_map[PostFader], post_fader_input, err)) { - return -1; + goto streamcount; } /* OK, everything can be set up correctly, so lets do it */ @@ -1241,15 +1243,15 @@ Route::_reset_plugin_counts (ProcessorStreams* err) /* recompute max outs of any processor */ + ret = 0; + + streamcount: processor_max_outs.reset(); - ProcessorList::iterator prev = _processors.end(); - for (r = _processors.begin(); r != _processors.end(); prev = r, ++r) { + for (r = _processors.begin(); r != _processors.end(); ++r) { processor_max_outs = max ((*r)->output_streams (), processor_max_outs); } - /* we're done */ - return 0; } |