summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/io.h
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-11-25 23:46:24 +0000
committerCarl Hetherington <carl@carlh.net>2010-11-25 23:46:24 +0000
commit54cbc45a5a40f4eefd64fa41ad9029f5f8f6a84f (patch)
tree558e7cb27683030787fcb4d5654bd4b58ebd8e21 /libs/ardour/ardour/io.h
parent28c004f4fb0750b6a4236552bcc8de4946b9b164 (diff)
Prevent removal of route inputs when the plugins cannot be configured with the new number. Rework locking so that the process lock is held from the point that a route input is removed until after the processors are reconfigured; fixes #3548.
git-svn-id: svn://localhost/ardour2/branches/3.0@8089 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/io.h')
-rw-r--r--libs/ardour/ardour/io.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/libs/ardour/ardour/io.h b/libs/ardour/ardour/io.h
index a94149e178..9d423f55a5 100644
--- a/libs/ardour/ardour/io.h
+++ b/libs/ardour/ardour/io.h
@@ -133,6 +133,7 @@ class IO : public SessionObject, public Latent
const ChanCount& n_ports () const { return _ports.count(); }
+ /** Emitted with the process lock held */
PBD::Signal2<void,IOChange,void*> changed;
virtual XMLNode& state (bool full);
@@ -140,6 +141,31 @@ class IO : public SessionObject, public Latent
int set_state (const XMLNode&, int version);
int set_state_2X (const XMLNode&, int, bool);
+ class BoolCombiner {
+ public:
+
+ typedef bool result_type;
+
+ template <typename Iter>
+ bool operator() (Iter first, Iter last) const {
+ bool r = false;
+ while (first != last) {
+ if (*first) {
+ r = true;
+ }
+ ++first;
+ }
+
+ return r;
+ }
+ };
+
+ /** Emitted when the port count is about to change. Objects
+ * can attach to this, and return `true' if they want to prevent
+ * the change from happening.
+ */
+ PBD::Signal1<bool, ChanCount, BoolCombiner> PortCountChanging;
+
static int disable_connecting (void);
static int enable_connecting (void);
static int disable_ports (void);