summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/route.h
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-09-30 16:45:45 +0200
committerRobin Gareus <robin@gareus.org>2017-09-30 16:45:45 +0200
commit5fa9f8b399726e248412ebcfdeb8ed751f5a48d4 (patch)
treed543ed6861cda53c943e989f2dab5274c8fd8223 /libs/ardour/ardour/route.h
parent697d29cdc2a59c698d2771f1dbec9a726a123843 (diff)
Towards fixing no_roll()
Currently ::roll() may actually be a ::no_roll() under some circumstances. This can also happen during count-in: transport_stopped () == transport_rolling() and during latency-preroll: Global session-transport speed != 0, some tracks already roll, read data from disk and feed latent plugins. but other non-latent tracks or busses don't roll and still have to behave like the switch from no_roll() to roll() has not yet happened. This changes the game WRT to monitoring as well, previously, Route:roll() called Route::no_roll_unlocked () for conditions outlined above. Now Track::no_roll_unlocked is called and in some cases wrongly clears the buffers before the signal hits the disk-writer. (more work is needed related to 61f8e53b) On the upside this also fixes an issue with MidiTrack::no_roll not keeping a lock while pushing data into the step-edit-ringbuffer. This is also a step towards consolidating all entry points: ::roll(), ::no_roll(), ::silent_roll() in the Route class.
Diffstat (limited to 'libs/ardour/ardour/route.h')
-rw-r--r--libs/ardour/ardour/route.h16
1 files changed, 7 insertions, 9 deletions
diff --git a/libs/ardour/ardour/route.h b/libs/ardour/ardour/route.h
index c0f2048a18..5376635076 100644
--- a/libs/ardour/ardour/route.h
+++ b/libs/ardour/ardour/route.h
@@ -138,14 +138,11 @@ public:
virtual void filter_input (BufferSet &) {}
- virtual int roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample,
- int declick, bool& need_butler);
+ int roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, int declick, bool& need_butler);
- virtual int no_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample,
- bool state_changing);
+ int no_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool state_changing);
- virtual int silent_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample,
- bool& need_butler);
+ int silent_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool& need_butler);
virtual bool can_record() { return false; }
@@ -589,8 +586,8 @@ public:
virtual void use_captured_sources (SourceList& srcs, CaptureInfos const &) {}
- protected:
- friend class Session;
+protected:
+ friend class Session;
void catch_up_on_solo_mute_override ();
void set_listen (bool);
@@ -598,6 +595,8 @@ public:
void curve_reallocate ();
virtual void set_block_size (pframes_t nframes);
+ virtual int no_roll_unlocked (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool session_state_changing);
+
void fill_buffers_with_input (BufferSet& bufs, boost::shared_ptr<IO> io, pframes_t nframes);
void passthru (BufferSet&, samplepos_t start_sample, samplepos_t end_sample, pframes_t nframes, int declick, bool gain_automation_ok, bool run_disk_reader);
@@ -747,7 +746,6 @@ private:
void setup_invisible_processors ();
- void no_roll_unlocked (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample);
pframes_t latency_preroll (pframes_t nframes, samplepos_t& start_sample, samplepos_t& end_sample);
void reset_instrument_info ();