From 40aebce6996abeccf46729ca069355f3bb34e5af Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Mon, 18 Sep 2017 21:27:55 -0400 Subject: consolidate roll methods into Route::roll() We want Track to shrink, and logic consolidation is always good. Route already knew about disk_reader and disk_writer, now it knows about _monitoring_control too --- libs/ardour/audio_track.cc | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) (limited to 'libs/ardour/audio_track.cc') diff --git a/libs/ardour/audio_track.cc b/libs/ardour/audio_track.cc index 403d48f5c0..efce77f6d8 100644 --- a/libs/ardour/audio_track.cc +++ b/libs/ardour/audio_track.cc @@ -222,52 +222,6 @@ AudioTrack::set_state_part_two () } } -/** @param need_butler to be set to true if this track now needs the butler, otherwise it can be left alone - * or set to false. - */ -int -AudioTrack::roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, int declick, bool& need_butler) -{ - Glib::Threads::RWLock::ReaderLock lm (_processor_lock, Glib::Threads::TRY_LOCK); - - if (!lm.locked()) { - return 0; - } - - if (n_outputs().n_total() == 0 && _processors.empty()) { - return 0; - } - - if (!_active) { - silence (nframes); - if (_meter_point == MeterInput && ((_monitoring_control->monitoring_choice() & MonitorInput) || _disk_writer->record_enabled())) { - _meter->reset(); - } - return 0; - } - - _silent = false; - _amp->apply_gain_automation(false); - - BufferSet& bufs = _session.get_route_buffers (n_process_buffers ()); - - fill_buffers_with_input (bufs, _input, nframes); - - if (_meter_point == MeterInput && ((_monitoring_control->monitoring_choice() & MonitorInput) || _disk_writer->record_enabled())) { - _meter->run (bufs, start_sample, end_sample, 1.0 /*speed()*/, nframes, true); - } - - process_output_buffers (bufs, start_sample, end_sample, nframes, declick, (!_disk_writer->record_enabled() && _session.transport_rolling())); - - if (_disk_reader->need_butler() || _disk_writer->need_butler()) { - need_butler = true; - } - - flush_processor_buffers_locked (nframes); - - return 0; -} - int AudioTrack::export_stuff (BufferSet& buffers, samplepos_t start, samplecnt_t nframes, boost::shared_ptr endpoint, bool include_endpoint, bool for_export, bool for_freeze) -- cgit v1.2.3