summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/session.h
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2020-03-20 17:38:23 -0600
committerPaul Davis <paul@linuxaudiosystems.com>2020-03-20 17:38:38 -0600
commit8296a030a582bd620479907ab17afc8fdc92609a (patch)
treeac94d91393b85b3d612e11fe5393575ee2cb89d5 /libs/ardour/ardour/session.h
parente6e0edbe90cff679831c4d4f2dec8789702d3296 (diff)
redesign chasing the transport master
Substantive comments associated with code in Session::plan_master_strategy. Known not to work for reverse TC. Also, the JACK related code has not yet been tested
Diffstat (limited to 'libs/ardour/ardour/session.h')
-rw-r--r--libs/ardour/ardour/session.h31
1 files changed, 29 insertions, 2 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h
index 3ab11aee91..c9b8c84798 100644
--- a/libs/ardour/ardour/session.h
+++ b/libs/ardour/ardour/session.h
@@ -775,7 +775,7 @@ public:
bool transport_stopped_or_stopping() const;
bool transport_rolling() const;
bool transport_will_roll_forwards() const;
-
+
bool silent () { return _silent; }
bool punch_is_possible () const;
@@ -1369,7 +1369,34 @@ private:
};
samplepos_t master_wait_end;
- void track_transport_master (float slave_speed, samplepos_t slave_transport_sample);
+
+ enum TransportMasterAction {
+ TransportMasterRelax,
+ TransportMasterNoRoll,
+ TransportMasterLocate,
+ TransportMasterStart,
+ TransportMasterStop,
+ TransportMasterWait,
+ };
+
+ struct TransportMasterStrategy {
+ TransportMasterAction action;
+ samplepos_t target;
+ LocateTransportDisposition roll_disposition;
+ double catch_speed;
+
+ TransportMasterStrategy ()
+ : action (TransportMasterRelax)
+ , target (0)
+ , roll_disposition (MustStop)
+ , catch_speed (0.) {}
+ };
+
+ TransportMasterStrategy transport_master_strategy;
+ double plan_master_strategy (pframes_t nframes, double master_speed, samplepos_t master_transport_sample, double catch_speed);
+ double plan_master_strategy_engine (pframes_t nframes, double master_speed, samplepos_t master_transport_sample, double catch_speed);
+ bool implement_master_strategy ();
+
bool follow_transport_master (pframes_t nframes);
void sync_source_changed (SyncSource, samplepos_t pos, pframes_t cycle_nframes);