when DiskReader checks to see if a locate is in progress, it must be atomic with respect to all DiskReaders
This commit is contained in:
parent
fb9dd1a411
commit
646d6bec7e
|
@ -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;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue