use new event loop callback to ensure that all surface/control protocol threads have tempo map ptr set
This commit is contained in:
@@ -21,6 +21,7 @@
|
||||
|
||||
#include "pbd/convert.h"
|
||||
#include "pbd/error.h"
|
||||
#include "pbd/pthread_utils.h"
|
||||
|
||||
#include "temporal/superclock.h"
|
||||
#include "temporal/tempo.h"
|
||||
@@ -65,6 +66,7 @@ const std::string ControlProtocol::state_node_name ("Protocol");
|
||||
ControlProtocol::ControlProtocol (Session& s, string str)
|
||||
: BasicUI (s)
|
||||
, _name (str)
|
||||
, glib_event_callback (boost::bind (&ControlProtocol::event_loop_precall, this))
|
||||
, _active (false)
|
||||
{
|
||||
if (!selection_connected) {
|
||||
@@ -78,6 +80,19 @@ ControlProtocol::~ControlProtocol ()
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
ControlProtocol::event_loop_precall ()
|
||||
{
|
||||
/* reload the thread-local ptr to the tempo map */
|
||||
Temporal::TempoMap::fetch ();
|
||||
}
|
||||
|
||||
void
|
||||
ControlProtocol::install_precall_handler (Glib::RefPtr<Glib::MainContext> context)
|
||||
{
|
||||
glib_event_callback.attach (context);
|
||||
}
|
||||
|
||||
int
|
||||
ControlProtocol::set_active (bool yn)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user