when selecting one of a set of variable I/O configs for an AudioUnit so that its...
[ardour.git] / libs / ardour / io.cc
index 93ab043308d1c4b89ddef72a1eae82de25c7e5f0..da79301a311e1c42a46be611f782f50f9f202cb0 100644 (file)
 
 #include "ardour/audioengine.h"
 #include "ardour/buffer.h"
+#include "ardour/buffer_set.h"
 #include "ardour/debug.h"
 #include "ardour/io.h"
-#include "ardour/route.h"
 #include "ardour/port.h"
-#include "ardour/audio_port.h"
-#include "ardour/midi_port.h"
+#include "ardour/route.h"
 #include "ardour/session.h"
-#include "ardour/cycle_timer.h"
-#include "ardour/buffer_set.h"
-#include "ardour/meter.h"
-#include "ardour/amp.h"
 #include "ardour/user_bundle.h"
 
 #include "i18n.h"
@@ -256,8 +251,8 @@ IO::remove_port (boost::shared_ptr<Port> port, void* src)
        ChanCount after = before;
        after.set (port->type(), after.get (port->type()) - 1);
 
-       bool const r = PortCountChanging (after); /* EMIT SIGNAL */
-       if (r) {
+       boost::optional<bool> const r = PortCountChanging (after); /* EMIT SIGNAL */
+       if (r.get_value_or (false)) {
                return -1;
        }
 
@@ -614,8 +609,6 @@ IO::set_state (const XMLNode& node, int version)
                return -1;
        }
 
-       cerr << "IO::set state, connecting legal ? " << connecting_legal << endl;
-
        if (connecting_legal) {
 
                if (make_connections (node, version, false)) {