+
+/* set custom-panner config
+ *
+ * This function is intended to be only called from
+ * Route::set_custom_panner()
+ * which will trigger IO-reconfigutaion if this fn return true
+ */
+bool
+PannerShell::set_user_selected_panner_uri (std::string const uri)
+{
+ if (uri == _user_selected_panner_uri) return false;
+ _user_selected_panner_uri = uri;
+ if (uri == _current_panner_uri) return false;
+ _force_reselect = true;
+ return true;
+}
+
+bool
+PannerShell::select_panner_by_uri (std::string const uri)
+{
+ if (uri == _user_selected_panner_uri) return false;
+ _user_selected_panner_uri = uri;
+ if (uri == _current_panner_uri) return false;
+ _force_reselect = true;
+ if (_panner) {
+ Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
+ ChanCount in = _panner->in();
+ ChanCount out = _panner->out();
+ configure_io(in, out);
+ if (!_is_send || !_panlinked) {
+ pannable()->set_panner(_panner);
+ }
+ _session.set_dirty ();
+ }
+ return true;
+}
+
+void
+PannerShell::set_linked_to_route (bool onoff)
+{
+ assert(_is_send);
+ if (onoff == _panlinked) {
+ return;
+ }
+
+ /* set _pannable-_has_state = true
+ * this way the panners will pick it up
+ * when it is re-created
+ */
+ if (pannable()) {
+ XMLNode state = pannable()->get_state();
+ pannable()->set_state(state, 3000);
+ }
+
+ _panlinked = onoff;
+
+ _force_reselect = true;
+ if (_panner) {
+ Glib::Threads::Mutex::Lock lx (AudioEngine::instance()->process_lock ());
+ ChanCount in = _panner->in();
+ ChanCount out = _panner->out();
+ configure_io(in, out);
+ if (!_panlinked) {
+ pannable()->set_panner(_panner);
+ }
+ _session.set_dirty ();
+ }
+ PannableChanged();
+}