summaryrefslogtreecommitdiff
path: root/libs/surfaces/mackie/mackie_control_protocol.cc
diff options
context:
space:
mode:
authorJohn Anderson <ardour@semiosix.com>2007-03-11 15:05:15 +0000
committerJohn Anderson <ardour@semiosix.com>2007-03-11 15:05:15 +0000
commitbfd6bdf392a0fffac8a2f7a0d9634e9d6ec14600 (patch)
tree5d58884373e4694ae3826b65802a3c6a4559d844 /libs/surfaces/mackie/mackie_control_protocol.cc
parent3c4cdadfd7a7a407431b9e56803c67782712f67b (diff)
to fix the abort on shutdown bug, make sure SurfacePort destructor doesn't kill the mutex until readers & writers have finished.
git-svn-id: svn://localhost/ardour2/trunk@1572 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/mackie/mackie_control_protocol.cc')
-rw-r--r--libs/surfaces/mackie/mackie_control_protocol.cc17
1 files changed, 7 insertions, 10 deletions
diff --git a/libs/surfaces/mackie/mackie_control_protocol.cc b/libs/surfaces/mackie/mackie_control_protocol.cc
index 4ff69d1acc..7824f1cb81 100644
--- a/libs/surfaces/mackie/mackie_control_protocol.cc
+++ b/libs/surfaces/mackie/mackie_control_protocol.cc
@@ -98,14 +98,14 @@ MackieControlProtocol::MackieControlProtocol (Session& session)
, pfd( 0 )
, nfds( 0 )
{
- cout << "MackieControlProtocol::MackieControlProtocol" << endl;
+ //cout << "MackieControlProtocol::MackieControlProtocol" << endl;
// will start reading from ports, as soon as there are some
pthread_create_and_store (X_("mackie monitor"), &thread, 0, _monitor_work, this);
}
MackieControlProtocol::~MackieControlProtocol()
{
- cout << "~MackieControlProtocol::MackieControlProtocol" << endl;
+ //cout << "~MackieControlProtocol::MackieControlProtocol" << endl;
try
{
close();
@@ -118,7 +118,7 @@ MackieControlProtocol::~MackieControlProtocol()
{
cout << "~MackieControlProtocol caught unknown" << endl;
}
- cout << "finished ~MackieControlProtocol::MackieControlProtocol" << endl;
+ //cout << "finished ~MackieControlProtocol::MackieControlProtocol" << endl;
}
Mackie::Surface & MackieControlProtocol::surface()
@@ -364,7 +364,6 @@ int MackieControlProtocol::set_active (bool yn)
if ( yn )
{
// TODO what happens if this fails half way?
- cout << "set_active true" << endl;
// create MackiePorts
{
@@ -389,7 +388,7 @@ int MackieControlProtocol::set_active (bool yn)
}
// wait until all ports are active
- // TODO a more sophisticate approach would
+ // TODO a more sophisticated approach would
// allow things to start up with only an MCU, even if
// extenders were specified but not responding.
for( MackiePorts::iterator it = _ports.begin(); it != _ports.end(); ++it )
@@ -407,19 +406,17 @@ int MackieControlProtocol::set_active (bool yn)
// send current control positions to surface
// must come after _active = true otherwise it won't run
- cout << "update_surface in set_active" << endl;
update_surface();
}
else
{
- cout << "set_active false" << endl;
close();
_active = false;
}
}
catch( exception & e )
{
- cout << "set_active to false because " << e.what() << endl;
+ cout << "set_active to false because exception caught: " << e.what() << endl;
_active = false;
throw;
}
@@ -729,7 +726,7 @@ void* MackieControlProtocol::_monitor_work (void* arg)
XMLNode & MackieControlProtocol::get_state()
{
- cout << "MackieControlProtocol::get_state" << endl;
+ //cout << "MackieControlProtocol::get_state" << endl;
// add name of protocol
XMLNode* node = new XMLNode( X_("Protocol") );
@@ -745,7 +742,7 @@ XMLNode & MackieControlProtocol::get_state()
int MackieControlProtocol::set_state( const XMLNode & node )
{
- cout << "MackieControlProtocol::set_state: active " << _active << endl;
+ //cout << "MackieControlProtocol::set_state: active " << _active << endl;
int retval = 0;
// fetch current bank