summaryrefslogtreecommitdiff
path: root/libs/surfaces/mackie/mackie_port.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2012-04-08 14:22:34 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2012-04-08 14:22:34 +0000
commitef484a8a3347a785321e2e140fc7e5caf5023fed (patch)
tree40cbe771fb5f854b7cf6a62710cdb16f320dc49d /libs/surfaces/mackie/mackie_port.cc
parentc72287e67d82e254f4cd089f8e17a16bf89e2335 (diff)
MCP: drop need for ScopedConnectionList::empty()
git-svn-id: svn://localhost/ardour2/branches/3.0@11825 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/mackie/mackie_port.cc')
-rw-r--r--libs/surfaces/mackie/mackie_port.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/libs/surfaces/mackie/mackie_port.cc b/libs/surfaces/mackie/mackie_port.cc
index eba8270329..d751437cb8 100644
--- a/libs/surfaces/mackie/mackie_port.cc
+++ b/libs/surfaces/mackie/mackie_port.cc
@@ -54,6 +54,7 @@ MackiePort::MackiePort (MackieControlProtocol & mcp, MIDI::Port & input_port, MI
, _port_type (port_type)
, _emulation (none)
, _initialising (true)
+ , _connected (false)
{
DEBUG_TRACE (DEBUG::MackieControl, "MackiePort::MackiePort\n");
}
@@ -104,7 +105,9 @@ void MackiePort::close()
// disconnect signals
sysex_connection.disconnect();
-
+ ScopedConnectionList::drop_connections ();
+ _connected = false;
+
// TODO emit a "closing" signal?
}
@@ -265,7 +268,7 @@ void MackiePort::finalise_init (bool yn)
void MackiePort::connect_to_signals ()
{
- if (ScopedConnectionList::empty()) {
+ if (!_connected) {
MIDI::Parser* p = input_port().parser();
@@ -279,8 +282,9 @@ void MackiePort::connect_to_signals ()
p->channel_pitchbend[5].connect_same_thread (*this, boost::bind (&MackiePort::handle_midi_pitchbend_message, this, _1, _2, 5U));
p->channel_pitchbend[6].connect_same_thread (*this, boost::bind (&MackiePort::handle_midi_pitchbend_message, this, _1, _2, 6U));
p->channel_pitchbend[7].connect_same_thread (*this, boost::bind (&MackiePort::handle_midi_pitchbend_message, this, _1, _2, 7U));
+
+ _connected = true;
}
-
}
bool MackiePort::wait_for_init()