1 #include "mackie_control_protocol.h"
3 #include "midi_byte_array.h"
4 #include "surface_port.h"
6 #include "pbd/pthread_utils.h"
9 #include "midi++/types.h"
10 #include "midi++/port.h"
11 #include "midi++/manager.h"
25 using namespace Mackie;
28 const char * MackieControlProtocol::default_port_name = "mcu";
30 bool MackieControlProtocol::probe()
35 void MackieControlProtocol::handle_port_inactive( SurfacePort * port )
37 // port gone away. So stop polling it ASAP
39 // delete the port instance
40 Glib::Mutex::Lock lock( update_mutex );
41 MackiePorts::iterator it = find( _ports.begin(), _ports.end(), port );
42 if ( it != _ports.end() )
49 // TODO all the rebuilding of surfaces and so on
52 void MackieControlProtocol::handle_port_active (SurfacePort *)
54 // no need to re-add port because it was already added
55 // during the init phase. So just update the local surface
56 // representation and send the representation to
59 // TODO update bank size
61 // TODO rebuild surface, to have new units
63 // finally update session state to the surface
64 // TODO but this is also done in set_active, and
65 // in fact update_surface won't execute unless
67 cout << "update_surface in handle_port_active" << endl;
73 void MackieControlProtocol::handle_port_init (Mackie::SurfacePort *)
76 cout << "MackieControlProtocol::handle_port_init" << endl;
79 cout << "MackieControlProtocol::handle_port_init finish" << endl;