Use glib event callback in Mackie Control support to set thread-local variables
This commit is contained in:
parent
b7d22508fa
commit
ce7ea4ec36
@ -22,6 +22,9 @@
|
||||
#include "pbd/convert.h"
|
||||
#include "pbd/error.h"
|
||||
|
||||
#include "temporal/superclock.h"
|
||||
#include "temporal/tempo.h"
|
||||
|
||||
#include "ardour/control_protocol_manager.h"
|
||||
#include "ardour/gain_control.h"
|
||||
#include "ardour/session.h"
|
||||
@ -376,3 +379,11 @@ ControlProtocol::notify_stripable_selection_changed (StripableNotificationListPt
|
||||
{
|
||||
_last_selected = *sp;
|
||||
}
|
||||
|
||||
void
|
||||
ControlProtocol::event_loop_precall ()
|
||||
{
|
||||
Temporal::set_thread_sample_rate (session->sample_rate());
|
||||
Temporal::TempoMap::fetch ();
|
||||
}
|
||||
|
||||
|
@ -141,6 +141,8 @@ public:
|
||||
static StripableNotificationList const& last_selected () { return _last_selected; }
|
||||
static void notify_stripable_selection_changed (StripableNotificationListPtr);
|
||||
|
||||
void event_loop_precall ();
|
||||
|
||||
protected:
|
||||
void next_track (uint32_t initial_id);
|
||||
void prev_track (uint32_t initial_id);
|
||||
|
@ -276,6 +276,8 @@ class MackieControlProtocol
|
||||
|
||||
bool stripable_is_locked_to_strip (boost::shared_ptr<ARDOUR::Stripable>) const;
|
||||
|
||||
void event_loop_precall () { ControlProtocol::event_loop_precall(); }
|
||||
|
||||
private:
|
||||
|
||||
struct ButtonHandlers {
|
||||
|
Loading…
Reference in New Issue
Block a user