From 5fa9f8b399726e248412ebcfdeb8ed751f5a48d4 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Sat, 30 Sep 2017 16:45:45 +0200 Subject: 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. --- libs/ardour/track.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'libs/ardour/track.cc') diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc index f201abcb12..5aad8b9bcf 100644 --- a/libs/ardour/track.cc +++ b/libs/ardour/track.cc @@ -430,14 +430,8 @@ Track::set_name (const string& str) } int -Track::no_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool session_state_changing) +Track::no_roll_unlocked (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool session_state_changing) { - Glib::Threads::RWLock::ReaderLock lm (_processor_lock, Glib::Threads::TRY_LOCK); - - if (!lm.locked()) { - return 0; - } - /* no outputs? nothing to do ... what happens if we have sends etc. ? */ if (n_outputs().n_total() == 0 && !ARDOUR::Profile->get_mixbus()) { -- cgit v1.2.3