summaryrefslogtreecommitdiff
path: root/libs/ardour/route.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2014-01-10 14:53:03 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2014-01-10 14:53:03 -0500
commitd15fda6d751a465d278f477923075d4783f3b1ca (patch)
tree99e36ff934f50d9c980dbeab09ad021cda3d098c /libs/ardour/route.cc
parent22c303d8f6c355a7229eb459cedf4fbdf0eb3c1d (diff)
parent0bdf4c25cfee8cf2408d2b1367f2c5e5c8c509b1 (diff)
fix merge errors with master
Diffstat (limited to 'libs/ardour/route.cc')
-rw-r--r--libs/ardour/route.cc53
1 files changed, 53 insertions, 0 deletions
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index c032b77eff..6f23e920d4 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -51,6 +51,7 @@
#include "ardour/midi_port.h"
#include "ardour/monitor_processor.h"
#include "ardour/pannable.h"
+#include "ardour/panner.h"
#include "ardour/panner_shell.h"
#include "ardour/plugin_insert.h"
#include "ardour/port.h"
@@ -1574,6 +1575,58 @@ Route::remove_processors (const ProcessorList& to_be_deleted, ProcessorStreams*
}
void
+Route::set_custom_panner_uri (std::string const panner_uri)
+{
+ if (_in_configure_processors) {
+ DEBUG_TRACE (DEBUG::Panning, string_compose (_("Route::set_custom_panner_uri '%1' -- called while in_configure_processors\n"), name()));
+ return;
+ }
+
+ if (!_main_outs->panner_shell()->set_user_selected_panner_uri(panner_uri)) {
+ DEBUG_TRACE (DEBUG::Panning, string_compose (_("Route::set_custom_panner_uri '%1 '%2' -- no change needed\n"), name(), panner_uri));
+ /* no change needed */
+ return;
+ }
+
+ DEBUG_TRACE (DEBUG::Panning, string_compose (_("Route::set_custom_panner_uri '%1 '%2' -- reconfigure I/O\n"), name(), panner_uri));
+
+ /* reconfigure I/O -- re-initialize panner modules */
+ {
+ Glib::Threads::RWLock::WriterLock lm (_processor_lock);
+ Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
+
+ for (ProcessorList::iterator p = _processors.begin(); p != _processors.end(); ++p) {
+ boost::shared_ptr<Delivery> dl;
+ boost::shared_ptr<Panner> panner;
+ if ((dl = boost::dynamic_pointer_cast<Delivery> (*p)) == 0) {
+ continue;
+ }
+ if (!dl->panner_shell()) {
+ continue;
+ }
+ if (!(panner = dl->panner_shell()->panner())) {
+ continue;
+ }
+ /* _main_outs has already been set before the loop.
+ * Ignore the return status here. It need reconfiguration */
+ if (dl->panner_shell() != _main_outs->panner_shell()) {
+ if (!dl->panner_shell()->set_user_selected_panner_uri(panner_uri)) {
+ continue;
+ }
+ }
+
+ ChanCount in = panner->in();
+ ChanCount out = panner->out();
+ dl->panner_shell()->configure_io(in, out);
+ dl->panner_shell()->pannable()->set_panner(dl->panner_shell()->panner());
+ }
+ }
+
+ processors_changed (RouteProcessorChange ()); /* EMIT SIGNAL */
+ _session.set_dirty ();
+}
+
+void
Route::reset_instrument_info ()
{
boost::shared_ptr<Processor> instr = the_instrument();