Comment a few things and add missing process lock when adding a route from a template.

git-svn-id: svn://localhost/ardour2/branches/3.0@8242 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington
2010-12-11 00:23:51 +00:00
parent cd175818ed
commit 19ae4ed640
4 changed files with 10 additions and 5 deletions

View File

@@ -133,8 +133,11 @@ class IO : public SessionObject, public Latent
const ChanCount& n_ports () const { return _ports.count(); }
/** Emitted with the process lock held */
PBD::Signal2<void,IOChange,void*> changed;
/* The process lock will be held on emission of this signal if
* IOChange contains ConfigurationChanged. In other cases,
* the process lock status is undefined.
*/
PBD::Signal2<void, IOChange, void *> changed;
virtual XMLNode& state (bool full);
XMLNode& get_state (void);

View File

@@ -189,7 +189,6 @@ IO::disconnect (Port* our_port, string other_port, void* src)
return 0;
}
/** Caller must hold process lock */
int
IO::connect (Port* our_port, string other_port, void* src)
{

View File

@@ -2718,7 +2718,7 @@ Route::nonrealtime_handle_transport_stopped (bool /*abort_ignored*/, bool did_lo
_roll_delay = _initial_delay;
}
/** Called with the process lock held */
/** Called with the process lock held if change contains ConfigurationChanged */
void
Route::input_change_handler (IOChange change, void * /*src*/)
{
@@ -2729,7 +2729,7 @@ Route::input_change_handler (IOChange change, void * /*src*/)
}
}
/** Called with the process lock held */
/** Called with the process lock held if change contains ConfigurationChanged */
void
Route::output_change_handler (IOChange change, void * /*src*/)
{

View File

@@ -1933,6 +1933,9 @@ Session::new_route_from_template (uint32_t how_many, const std::string& template
picks up the configuration of the route. During session
loading this normally happens in a different way.
*/
Glib::Mutex::Lock lm (AudioEngine::instance()->process_lock ());
IOChange change (IOChange::Type (IOChange::ConfigurationChanged | IOChange::ConnectionsChanged));
change.after = route->input()->n_ports();
route->input()->changed (change, this);