summaryrefslogtreecommitdiff
path: root/libs/midi++2/mmc.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2010-07-03 00:11:33 +0000
committerCarl Hetherington <carl@carlh.net>2010-07-03 00:11:33 +0000
commitbde4d3f3412e16543faff7bd489beb040311b781 (patch)
tree2e743f306fec80520cd1bdec474f27c90aa57739 /libs/midi++2/mmc.cc
parent2062ce8186592801d84162f6fa14173769b37521 (diff)
Fix up my previous buggy MMC cleanup.
git-svn-id: svn://localhost/ardour2/branches/3.0@7363 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/midi++2/mmc.cc')
-rw-r--r--libs/midi++2/mmc.cc26
1 files changed, 24 insertions, 2 deletions
diff --git a/libs/midi++2/mmc.cc b/libs/midi++2/mmc.cc
index 8adfcafb85..79132f0e1a 100644
--- a/libs/midi++2/mmc.cc
+++ b/libs/midi++2/mmc.cc
@@ -210,10 +210,13 @@ MachineControl::set_port (Port* p)
{
_port = p;
- mmc_connection.disconnect ();
+ port_connections.drop_connections ();
if (_port->input()) {
- _port->input()->mmc.connect_same_thread (mmc_connection, boost::bind (&MachineControl::process_mmc_message, this, _1, _2, _3));
+ _port->input()->mmc.connect_same_thread (port_connections, boost::bind (&MachineControl::process_mmc_message, this, _1, _2, _3));
+ _port->input()->start.connect_same_thread (port_connections, boost::bind (&MachineControl::spp_start, this, _1, _2));
+ _port->input()->contineu.connect_same_thread (port_connections, boost::bind (&MachineControl::spp_continue, this, _1, _2));
+ _port->input()->stop.connect_same_thread (port_connections, boost::bind (&MachineControl::spp_stop, this, _1, _2));
} else {
warning << "MMC connected to a non-input port: useless!" << endmsg;
}
@@ -688,6 +691,24 @@ MachineControl::set_sending_thread (pthread_t t)
_sending_thread = t;
}
+void
+MachineControl::spp_start (Parser& parser, nframes_t timestamp)
+{
+ SPPStart (parser, timestamp); /* EMIT SIGNAL */
+}
+
+void
+MachineControl::spp_continue (Parser& parser, nframes_t timestamp)
+{
+ SPPContinue (parser, timestamp); /* EMIT SIGNAL */
+}
+
+void
+MachineControl::spp_stop (Parser& parser, nframes_t timestamp)
+{
+ SPPStop (parser, timestamp); /* EMIT SIGNAL */
+}
+
MachineControlCommand::MachineControlCommand (MachineControl::Command c)
: _command (c)
{
@@ -725,3 +746,4 @@ MachineControlCommand::fill_buffer (MachineControl* mmc, MIDI::byte* b) const
return b;
}
+