summaryrefslogtreecommitdiff
path: root/libs/ardour/midi_track.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2017-09-18 21:27:55 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2017-09-18 21:28:02 -0400
commit40aebce6996abeccf46729ca069355f3bb34e5af (patch)
treee9cc8c66a3afe6979c0ae7493fca58fadbdedbec /libs/ardour/midi_track.cc
parent10b76ae631d971611bcb389d18995942300d0404 (diff)
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
Diffstat (limited to 'libs/ardour/midi_track.cc')
-rw-r--r--libs/ardour/midi_track.cc61
1 files changed, 6 insertions, 55 deletions
diff --git a/libs/ardour/midi_track.cc b/libs/ardour/midi_track.cc
index 91916bd914..4832ccce07 100644
--- a/libs/ardour/midi_track.cc
+++ b/libs/ardour/midi_track.cc
@@ -317,61 +317,6 @@ MidiTrack::update_controls(const BufferSet& bufs)
}
}
-/** @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
-MidiTrack::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);
-
- /* filter captured data before meter sees it */
- _capture_filter.filter (bufs);
-
- 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);
- }
-
- /* append immediate messages to the first MIDI buffer (thus sending it to the first output port) */
-
- write_out_of_band_data (bufs, start_sample, end_sample, nframes);
-
- /* final argument: don't waste time with automation if we're not recording or rolling */
-
- process_output_buffers (bufs, start_sample, end_sample, nframes, declick, (!_disk_writer->record_enabled() && !_session.transport_stopped()));
-
- if (_disk_reader->need_butler() || _disk_writer->need_butler()) {
- need_butler = true;
- }
-
- flush_processor_buffers_locked (nframes);
-
- return 0;
-}
-
int
MidiTrack::no_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample, bool state_changing)
{
@@ -863,3 +808,9 @@ MidiTrack::monitoring_state () const
}
return ms;
}
+
+void
+MidiTrack::filter_input (BufferSet& bufs)
+{
+ _capture_filter.filter (bufs);
+}