diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-09-12 11:28:50 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-09-12 11:28:50 -0400 |
commit | bb826f4beebfcedc50570b818c305560d2233e47 (patch) | |
tree | 1484460f914e64fdbdce58230ffe7934bc0761f4 /libs/midi++2/mmc.cc | |
parent | 8c5cff60912c7e0a7256f635641399500d8d00d9 (diff) | |
parent | f85b362351a5f9167f93b6988f2c8a4c7e03a33c (diff) |
incomplete merge of master into windows (requires upcoming changes to master to be complete)
Diffstat (limited to 'libs/midi++2/mmc.cc')
-rw-r--r-- | libs/midi++2/mmc.cc | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/libs/midi++2/mmc.cc b/libs/midi++2/mmc.cc index 1b8de40358..1b9481c9bf 100644 --- a/libs/midi++2/mmc.cc +++ b/libs/midi++2/mmc.cc @@ -22,12 +22,12 @@ #include <map> #include "timecode/time.h" + #include "pbd/error.h" + #include "midi++/mmc.h" #include "midi++/port.h" -#include "midi++/jack_midi_port.h" #include "midi++/parser.h" -#include "midi++/manager.h" #ifndef __INT_MAX__ // 'ssize_t' won't be defined yet typedef long ssize_t; @@ -199,16 +199,21 @@ static void build_mmc_cmd_map () mmc_cmd_map.insert (newpair); } - -MachineControl::MachineControl (Manager* m, jack_client_t* jack) +MachineControl::MachineControl () { build_mmc_cmd_map (); _receive_device_id = 0x7f; _send_device_id = 0x7f; +} + +void +MachineControl::set_ports (MIDI::Port* ip, MIDI::Port* op) +{ + port_connections.drop_connections (); - _input_port = m->add_port (new JackMIDIPort ("MMC in", Port::IsInput, jack)); - _output_port = m->add_port (new JackMIDIPort ("MMC out", Port::IsOutput, jack)); + _input_port = ip; + _output_port = op; _input_port->parser()->mmc.connect_same_thread (port_connections, boost::bind (&MachineControl::process_mmc_message, this, _1, _2, _3)); _input_port->parser()->start.connect_same_thread (port_connections, boost::bind (&MachineControl::spp_start, this)); |