summaryrefslogtreecommitdiff
path: root/libs/ardour/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/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/track.cc')
-rw-r--r--libs/ardour/track.cc148
1 files changed, 1 insertions, 147 deletions
diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc
index d925c2c40d..48235417a5 100644
--- a/libs/ardour/track.cc
+++ b/libs/ardour/track.cc
@@ -548,7 +548,7 @@ Track::no_roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sam
_meter->run (bufs, start_sample, end_sample, _session.transport_speed(), nframes, true);
}
- passthru (bufs, start_sample, end_sample, nframes, false);
+ passthru (bufs, start_sample, end_sample, nframes, false, true);
}
flush_processor_buffers_locked (nframes);
@@ -980,152 +980,6 @@ Track::adjust_capture_buffering ()
}
}
-#ifdef USE_TRACKS_CODE_FEATURES
-
-/* This is the Tracks version of Track::monitoring_state().
- *
- * Ardour developers: try to flag or fix issues if parts of the libardour API
- * change in ways that invalidate this
- */
-
-MonitorState
-Track::monitoring_state () const
-{
- /* Explicit requests */
-
- if (_monitoring != MonitorInput) {
- return MonitoringInput;
- }
-
- if (_monitoring & MonitorDisk) {
- return MonitoringDisk;
- }
-
- /* This is an implementation of the truth table in doc/monitor_modes.pdf;
- I don't think it's ever going to be too pretty too look at.
- */
-
- // GZ: NOT USED IN TRACKS
- //bool const auto_input = _session.config.get_auto_input ();
- //bool const software_monitor = Config->get_monitoring_model() == SoftwareMonitoring;
- //bool const tape_machine_mode = Config->get_tape_machine_mode ();
-
- bool const roll = _session.transport_rolling ();
- bool const track_rec = _diskstream->record_enabled ();
- bool session_rec = _session.actively_recording ();
-
- if (track_rec) {
-
- if (!session_rec && roll) {
- return MonitoringDisk;
- } else {
- return MonitoringInput;
- }
-
- } else {
-
- if (roll) {
- return MonitoringDisk;
- }
- }
-
- return MonitoringSilence;
-}
-
-#else
-
-/* This is the Ardour/Mixbus version of Track::monitoring_state().
- *
- * Tracks developers: do NOT modify this method under any circumstances.
- */
-
-MonitorState
-Track::monitoring_state () const
-{
- /* Explicit requests */
- MonitorChoice m (_monitoring_control->monitoring_choice());
-
- if (m != MonitorAuto) {
-
- MonitorState ms ((MonitorState) 0);
-
- if (m & MonitorInput) {
- ms = MonitoringInput;
- }
-
- if (m & MonitorDisk) {
- ms = MonitorState (ms | MonitoringDisk);
- }
-
- return ms;
- }
-
- switch (_session.config.get_session_monitoring ()) {
- case MonitorDisk:
- return MonitoringDisk;
- break;
- case MonitorInput:
- return MonitoringInput;
- break;
- default:
- break;
- }
-
- /* This is an implementation of the truth table in doc/monitor_modes.pdf;
- I don't think it's ever going to be too pretty too look at.
- */
-
- bool const roll = _session.transport_rolling ();
- bool const track_rec = _disk_writer->record_enabled ();
- bool const auto_input = _session.config.get_auto_input ();
- bool const software_monitor = Config->get_monitoring_model() == SoftwareMonitoring;
- bool const tape_machine_mode = Config->get_tape_machine_mode ();
- bool session_rec;
-
- /* I suspect that just use actively_recording() is good enough all the
- * time, but just to keep the semantics the same as they were before
- * sept 26th 2012, we differentiate between the cases where punch is
- * enabled and those where it is not.
- *
- * rg: I suspect this is not the case: monitoring may differ
- */
-
- if (_session.config.get_punch_in() || _session.config.get_punch_out() || _session.preroll_record_punch_enabled ()) {
- session_rec = _session.actively_recording ();
- } else {
- session_rec = _session.get_record_enabled();
- }
-
- if (track_rec) {
-
- if (!session_rec && roll && auto_input) {
- return MonitoringDisk;
- } else {
- return software_monitor ? MonitoringInput : MonitoringSilence;
- }
-
- } else {
-
- if (tape_machine_mode) {
-
- return MonitoringDisk;
-
- } else {
-
- if (!roll && auto_input) {
- return software_monitor ? MonitoringInput : MonitoringSilence;
- } else {
- return MonitoringDisk;
- }
-
- }
- }
-
- abort(); /* NOTREACHED */
- return MonitoringSilence;
-}
-
-#endif
void
Track::maybe_declick (BufferSet& bufs, samplecnt_t nframes, int declick)