From 4daf15435b39517b4b09d0bd66060b4c55bcf078 Mon Sep 17 00:00:00 2001 From: John Anderson Date: Thu, 15 Feb 2007 17:42:17 +0000 Subject: [PATCH] Fix two small bugs in ControlProtocolManager: 1) set_active was being called twice 2) control surface objects were deleted in drop_session, but not recreated in set_session git-svn-id: svn://localhost/ardour2/trunk@1467 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/control_protocol_manager.cc | 13 +++---------- libs/surfaces/mackie/TODO | 6 ++---- 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/libs/ardour/control_protocol_manager.cc b/libs/ardour/control_protocol_manager.cc index 72f56794d7..899790dddc 100644 --- a/libs/ardour/control_protocol_manager.cc +++ b/libs/ardour/control_protocol_manager.cc @@ -43,7 +43,6 @@ ControlProtocolManager::~ControlProtocolManager() } control_protocol_info.clear(); - } void @@ -75,12 +74,11 @@ ControlProtocolManager::drop_session () delete *p; } control_protocols.clear (); - + for (list::iterator p = control_protocol_info.begin(); p != control_protocol_info.end(); ++p) { - delete *p; + // otherwise the ControlProtocol instances are not recreated in set_session + (*p)->requested = true; } - - control_protocol_info.clear(); } } @@ -106,10 +104,6 @@ ControlProtocolManager::instantiate (ControlProtocolInfo& cpi) Glib::Mutex::Lock lm (protocols_lock); control_protocols.push_back (cpi.protocol); - if (cpi.state) { - cpi.protocol->set_state (*cpi.state); - } - return cpi.protocol; } @@ -297,7 +291,6 @@ ControlProtocolManager::set_state (const XMLNode& node) if ((prop = (*citer)->property (X_("name"))) != 0) { ControlProtocolInfo* cpi = cpi_by_name (prop->value()); if (cpi) { - if (!(*citer)->children().empty()) { cpi->state = (*citer)->children().front (); } else { diff --git a/libs/surfaces/mackie/TODO b/libs/surfaces/mackie/TODO index 5164c9acda..8e7e795acd 100644 --- a/libs/surfaces/mackie/TODO +++ b/libs/surfaces/mackie/TODO @@ -2,7 +2,6 @@ where ENSURE_CORRECT_THREAD is a macro that is modelled on ENSURE_GUI_THREAD if the handler is not called in the "correct thread", it will use a pseudo-RT-safe-enough technique to get the correct thread to recall "handler" later on, and return. -* occasional hang on startup. deadlock? * finish button mapping * discuss button mapping for Ardour * concurrency for bank switching? And make sure "old" events aren't sent to "new" faders @@ -19,6 +18,7 @@ * power-cycling of surface. fd_midiport doesn't close. * remove couts * jog with transport rolling doesn't work properly +* docs in manual Later ----- @@ -28,7 +28,7 @@ Later Actual Mackie ------------- * docs claim that unit will send a host query on init. -* test Mackie surface object. Apparently led rings don't work +* test Mackie surface object. Apparently led rings don't work. Stereo busses? * timecode & 55 char displays * midi bandwidth @@ -36,8 +36,6 @@ Bugs ---- * get_state isn't called on deactivate -* close existing and load other session doesn't start control surface -* set_state is called twice from the control_manager * routes "forget" their remote_id between session save and the next session load * definitely something wrong with remote_id assignment on session create (master strip assigned 0).