diff options
author | Carl Hetherington <carl@carlh.net> | 2011-12-07 17:50:56 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2011-12-07 17:50:56 +0000 |
commit | 5700d10890669e8a890288b208808f8a8467855a (patch) | |
tree | fce2931d21b15f7477911b8d09ac61582deb8e54 /libs/ardour/io.cc | |
parent | ff7785142de6fb8fa57e3334f76195122fad111b (diff) |
Check that adding a port to an IO is ok with the processors
in its route, and raise an error if not (part of #4535).
git-svn-id: svn://localhost/ardour2/branches/3.0@10938 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/io.cc')
-rw-r--r-- | libs/ardour/io.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libs/ardour/io.cc b/libs/ardour/io.cc index 23c7594d40..c5f0c7361d 100644 --- a/libs/ardour/io.cc +++ b/libs/ardour/io.cc @@ -292,6 +292,15 @@ IO::add_port (string destination, void* src, DataType type) type = _default_type; } + ChanCount before = _ports.count (); + ChanCount after = before; + after.set (type, after.get (type) + 1); + + bool const r = PortCountChanging (after); /* EMIT SIGNAL */ + if (r) { + return -1; + } + IOChange change; { |