projects
/
ardour.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update recorded MIDI regions as notes arrive. Fixes one cause of infinite note-lengt...
[ardour.git]
/
libs
/
ardour
/
ardour
/
session_route.h
diff --git
a/libs/ardour/ardour/session_route.h
b/libs/ardour/ardour/session_route.h
index afe78b394e39efcafba0cf1b0893a1d7c2431c18..cfaa13cdc8c354f182e224c2fd17b0524e84f407 100644
(file)
--- a/
libs/ardour/ardour/session_route.h
+++ b/
libs/ardour/ardour/session_route.h
@@
-1,5
+1,5
@@
/*
/*
- Copyright (C) 2000 Paul Davis
+ Copyright (C) 2000 Paul Davis
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-15,7
+15,6
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id$
*/
#ifndef __ardour_session_route_h__
*/
#ifndef __ardour_session_route_h__
@@
-25,22
+24,18
@@
#include <glibmm/thread.h>
#include <glibmm/thread.h>
-#include
<ardour/session.h>
-#include
<ardour/route.h>
+#include
"ardour/session.h"
+#include
"ardour/route.h"
namespace ARDOUR {
namespace ARDOUR {
-template<class T> void
+template<class T> void
Session::foreach_route (T *obj, void (T::*func)(Route&))
{
Session::foreach_route (T *obj, void (T::*func)(Route&))
{
- RouteList public_order;
-
- {
- Glib::RWLock::ReaderLock lm (route_lock);
- public_order = routes;
- }
-
+ boost::shared_ptr<RouteList> r = routes.reader();
+ RouteList public_order (*r);
RoutePublicOrderSorter cmp;
RoutePublicOrderSorter cmp;
+
public_order.sort (cmp);
for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) {
public_order.sort (cmp);
for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) {
@@
-48,17
+43,13
@@
Session::foreach_route (T *obj, void (T::*func)(Route&))
}
}
}
}
-template<class T> void
-Session::foreach_route (T *obj, void (T::*func)(
Route*
))
+template<class T> void
+Session::foreach_route (T *obj, void (T::*func)(
boost::shared_ptr<Route>
))
{
{
- RouteList public_order;
-
- {
- Glib::RWLock::ReaderLock lm (route_lock);
- public_order = routes;
- }
-
+ boost::shared_ptr<RouteList> r = routes.reader();
+ RouteList public_order (*r);
RoutePublicOrderSorter cmp;
RoutePublicOrderSorter cmp;
+
public_order.sort (cmp);
for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) {
public_order.sort (cmp);
for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) {
@@
-66,18
+57,13
@@
Session::foreach_route (T *obj, void (T::*func)(Route*))
}
}
}
}
-
-template<class T, class A> void
+template<class T, class A> void
Session::foreach_route (T *obj, void (T::*func)(Route&, A), A arg1)
{
Session::foreach_route (T *obj, void (T::*func)(Route&, A), A arg1)
{
- RouteList public_order;
-
- {
- Glib::RWLock::ReaderLock lm (route_lock);
- public_order = routes;
- }
-
+ boost::shared_ptr<RouteList> r = routes.reader();
+ RouteList public_order (*r);
RoutePublicOrderSorter cmp;
RoutePublicOrderSorter cmp;
+
public_order.sort (cmp);
for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) {
public_order.sort (cmp);
for (RouteList::iterator i = public_order.begin(); i != public_order.end(); i++) {