diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2017-07-05 17:24:02 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2017-09-18 11:40:53 -0400 |
commit | 646d6bec7e3174644184e05a4b9da4501af53dd1 (patch) | |
tree | d828cea7db7bf1c0c9e5179b10f57c795182a0e3 | |
parent | fb9dd1a411d518472521047b1f3451aabdc334a0 (diff) |
when DiskReader checks to see if a locate is in progress, it must be atomic with respect to all DiskReaders
-rw-r--r-- | libs/ardour/ardour/session.h | 3 | ||||
-rw-r--r-- | libs/ardour/disk_reader.cc | 2 | ||||
-rw-r--r-- | libs/ardour/session.cc | 1 | ||||
-rw-r--r-- | libs/ardour/session_process.cc | 4 |
4 files changed, 9 insertions, 1 deletions
diff --git a/libs/ardour/ardour/session.h b/libs/ardour/ardour/session.h index d6c49e489c..70be771ef4 100644 --- a/libs/ardour/ardour/session.h +++ b/libs/ardour/ardour/session.h @@ -433,6 +433,7 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop void adjust_playback_buffering(); void adjust_capture_buffering(); + bool global_locate_pending() const { return _global_locate_pending; } bool locate_pending() const { return static_cast<bool>(post_transport_work()&PostTransportLocate); } bool declick_out_pending() const { return static_cast<bool>(transport_sub_state&(PendingDeclickOut)); } bool transport_locked () const; @@ -2095,6 +2096,8 @@ class LIBARDOUR_API Session : public PBD::StatefulDestructible, public PBD::Scop boost::weak_ptr<MidiTrack> current_midi_target; CoreSelection* _selection; + + bool _global_locate_pending; }; diff --git a/libs/ardour/disk_reader.cc b/libs/ardour/disk_reader.cc index 1dee19522c..98bb05f0d6 100644 --- a/libs/ardour/disk_reader.cc +++ b/libs/ardour/disk_reader.cc @@ -277,7 +277,7 @@ DiskReader::run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, } BufferSet& scratch_bufs (_session.get_scratch_buffers (bufs.count())); - const bool still_locating = _session.locate_pending(); + const bool still_locating = _session.global_locate_pending(); if (!result_required || ((ms & MonitoringDisk) == 0) || still_locating) { diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index b658487969..a880ff0a09 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -328,6 +328,7 @@ Session::Session (AudioEngine &eng, , _mmc (0) , _vca_manager (new VCAManager (*this)) , _selection (new CoreSelection (*this)) + , _global_locate_pending (false) { uint32_t sr = 0; diff --git a/libs/ardour/session_process.cc b/libs/ardour/session_process.cc index c1230fc09e..19a6b64720 100644 --- a/libs/ardour/session_process.cc +++ b/libs/ardour/session_process.cc @@ -192,6 +192,8 @@ Session::process_routes (pframes_t nframes, bool& need_butler) (*i)->automation_run (start_frame, nframes); } + _global_locate_pending = locate_pending (); + if (_process_graph) { DEBUG_TRACE(DEBUG::ProcessThreads,"calling graph/process-routes\n"); if (_process_graph->process_routes (nframes, start_frame, end_frame, declick, need_butler) < 0) { @@ -243,6 +245,8 @@ Session::silent_process_routes (pframes_t nframes, bool& need_butler) (*i)->automation_run (start_frame, nframes); } + _global_locate_pending = locate_pending(); + if (_process_graph) { _process_graph->silent_process_routes (nframes, start_frame, end_frame, need_butler); } else { |