summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2009-12-07 21:37:35 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2009-12-07 21:37:35 +0000
commit9686f8097d45c306168d1a5220d9c8bf225edb8c (patch)
tree274d7f7d8a549f96a5459d9be257581980906be3 /libs/ardour/ardour
parentdc86434283718b7c4a4ed6af52a950e6cfc5e86f (diff)
first pass at end-to-end RT operation request (GUI->session->RT thread->GUI), just for rec-enable
git-svn-id: svn://localhost/ardour2/branches/3.0@6324 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour')
-rw-r--r--libs/ardour/ardour/session.h16
-rw-r--r--libs/ardour/ardour/session_event.h6
2 files changed, 17 insertions, 5 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index c9b2ba11a3..18af14a313 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -330,6 +330,12 @@ class Session : public PBD::StatefulDestructible, public SessionEventManager, pu
int remove_region_from_region_list (boost::shared_ptr<Region>);
+ /* ask the session to do realtime things, in RT context, then get back to us via a callback (which must be
+ cross-thread or RT safe, since it too is called from RT context)
+ */
+
+ void request_real_time_operation (sigc::slot<void> rt_op, sigc::slot<void,SessionEvent*> callback);
+
nframes_t get_maximum_extent () const;
nframes_t current_end_frame() const { return end_location->start(); }
nframes_t current_start_frame() const { return start_location->start(); }
@@ -621,8 +627,8 @@ class Session : public PBD::StatefulDestructible, public SessionEventManager, pu
sigc::signal<void,bool> SoloActive;
sigc::signal<void> SoloChanged;
- void record_disenable_all ();
- void record_enable_all ();
+ void record_disenable_all (sigc::slot<void,SessionEvent*>);
+ void record_enable_all (sigc::slot<void,SessionEvent*>);
/* control/master out */
@@ -719,6 +725,9 @@ class Session : public PBD::StatefulDestructible, public SessionEventManager, pu
void begin_reversible_command (const std::string& cmd_name);
void commit_reversible_command (Command* cmd = 0);
+ UndoTransaction* start_reversible_command (const std::string& cmd_name);
+ void finish_reversible_command (UndoTransaction&);
+
void add_command (Command *const cmd) {
assert(!_current_trans.empty ());
_current_trans.top()->add_command (cmd);
@@ -1466,8 +1475,9 @@ class Session : public PBD::StatefulDestructible, public SessionEventManager, pu
void jack_timebase_callback (jack_transport_state_t, nframes_t, jack_position_t*, int);
int jack_sync_callback (jack_transport_state_t, jack_position_t*);
void reset_jack_connection (jack_client_t* jack);
- void record_enable_change_all (bool yn);
+ void record_enable_change_all (bool yn, sigc::slot<void,SessionEvent*>);
void do_record_enable_change_all (RouteList*, bool);
+ void process_rtop (SessionEvent*);
XMLNode& state(bool);
diff --git a/libs/ardour/ardour/session_event.h b/libs/ardour/ardour/session_event.h
index 07c795257f..a903e3cd4f 100644
--- a/libs/ardour/ardour/session_event.h
+++ b/libs/ardour/ardour/session_event.h
@@ -33,6 +33,7 @@ struct SessionEvent {
InputConfigurationChange,
SetPlayAudioRange,
SetRecordEnable,
+ RealTimeOperation,
/* only one of each of these events can be queued at any one time */
@@ -66,13 +67,14 @@ struct SessionEvent {
RouteList* routes;
};
+ sigc::slot<void> rt_slot; /* what to call in RT context */
+ sigc::slot<void,SessionEvent*> rt_return; /* called after rt_slot, with this event as an argument */
+
std::list<AudioRange> audio_range;
std::list<MusicRange> music_range;
boost::shared_ptr<Region> region;
- sigc::signal<void,SessionEvent*,int> Complete;
-
SessionEvent (Type t, Action a, nframes_t when, nframes_t where, double spd, bool yn = false, bool yn2 = false)
: type (t)
, action (a)