summaryrefslogtreecommitdiff
path: root/libs/ardour/session_rtevents.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-12-11 23:30:48 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-12-11 23:30:48 +0000
commit401c7091c805b24b926acb2b393070d3a32628a6 (patch)
tree240fd4ed7350e6e6fe75747cb904901154cf259d /libs/ardour/session_rtevents.cc
parent64dc5427e4f5339a16a018692dd94f476c53cae9 (diff)
switch to use boost::function for UI::call_slot operations, to avoid a serious thread safety issue with libsigc++
git-svn-id: svn://localhost/ardour2/branches/3.0@6355 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_rtevents.cc')
-rw-r--r--libs/ardour/session_rtevents.cc18
1 files changed, 10 insertions, 8 deletions
diff --git a/libs/ardour/session_rtevents.cc b/libs/ardour/session_rtevents.cc
index 6d3e7ce78c..945e422076 100644
--- a/libs/ardour/session_rtevents.cc
+++ b/libs/ardour/session_rtevents.cc
@@ -16,6 +16,8 @@
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+#include <boost/bind.hpp>
+
#include "pbd/error.h"
#include "pbd/compose.h"
@@ -31,11 +33,11 @@ using namespace ARDOUR;
using namespace Glib;
SessionEvent*
-Session::get_rt_event (boost::shared_ptr<RouteList> rl, bool yn, sigc::slot<void,SessionEvent*> after, bool group_override,
+Session::get_rt_event (boost::shared_ptr<RouteList> rl, bool yn, SessionEvent::RTeventCallback after, bool group_override,
void (Session::*method) (boost::shared_ptr<RouteList>, bool, bool))
{
SessionEvent* ev = new SessionEvent (SessionEvent::RealTimeOperation, SessionEvent::Add, SessionEvent::Immediate, 0, 0.0);
- ev->rt_slot = bind (sigc::mem_fun (*this, method), rl, yn, group_override);
+ ev->rt_slot = boost::bind (method, this, rl, yn, group_override);
ev->rt_return = after;
ev->ui = UICallback::get_ui_for_thread ();
@@ -43,7 +45,7 @@ Session::get_rt_event (boost::shared_ptr<RouteList> rl, bool yn, sigc::slot<void
}
void
-Session::set_solo (boost::shared_ptr<RouteList> rl, bool yn, sigc::slot<void,SessionEvent*> after, bool group_override)
+Session::set_solo (boost::shared_ptr<RouteList> rl, bool yn, SessionEvent::RTeventCallback after, bool group_override)
{
queue_event (get_rt_event (rl, yn, after, group_override, &Session::rt_set_solo));
}
@@ -61,7 +63,7 @@ Session::rt_set_solo (boost::shared_ptr<RouteList> rl, bool yn, bool group_overr
}
void
-Session::set_just_one_solo (boost::shared_ptr<Route> r, bool yn, sigc::slot<void,SessionEvent*> after)
+Session::set_just_one_solo (boost::shared_ptr<Route> r, bool yn, SessionEvent::RTeventCallback after)
{
/* its a bit silly to have to do this, but it keeps the API for this public method sane (we're
only going to solo one route) and keeps our ability to use get_rt_event() for the internal
@@ -92,7 +94,7 @@ Session::rt_set_just_one_solo (boost::shared_ptr<RouteList> just_one, bool yn, b
}
void
-Session::set_listen (boost::shared_ptr<RouteList> rl, bool yn, sigc::slot<void,SessionEvent*> after, bool group_override)
+Session::set_listen (boost::shared_ptr<RouteList> rl, bool yn, SessionEvent::RTeventCallback after, bool group_override)
{
queue_event (get_rt_event (rl, yn, after, group_override, &Session::rt_set_listen));
}
@@ -110,7 +112,7 @@ Session::rt_set_listen (boost::shared_ptr<RouteList> rl, bool yn, bool group_ove
}
void
-Session::set_mute (boost::shared_ptr<RouteList> rl, bool yn, sigc::slot<void,SessionEvent*> after, bool group_override)
+Session::set_mute (boost::shared_ptr<RouteList> rl, bool yn, SessionEvent::RTeventCallback after, bool group_override)
{
queue_event (get_rt_event (rl, yn, after, group_override, &Session::rt_set_mute));
}
@@ -128,7 +130,7 @@ Session::rt_set_mute (boost::shared_ptr<RouteList> rl, bool yn, bool group_overr
}
void
-Session::set_record_enable (boost::shared_ptr<RouteList> rl, bool yn, sigc::slot<void,SessionEvent*> after, bool group_override)
+Session::set_record_enable (boost::shared_ptr<RouteList> rl, bool yn, SessionEvent::RTeventCallback after, bool group_override)
{
if (!writable()) {
return;
@@ -161,7 +163,7 @@ Session::process_rtop (SessionEvent* ev)
ev->rt_slot ();
if (ev->ui) {
- ev->ui->call_slot (bind (ev->rt_return, ev));
+ ev->ui->call_slot (boost::bind (ev->rt_return, ev));
} else {
warning << string_compose ("programming error: %1", X_("Session RT event queued from thread without a UI - cleanup in RT thread!")) << endmsg;
ev->rt_return (ev);