summaryrefslogtreecommitdiff
path: root/libs/ardour/track.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-05-08 13:44:24 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-06-29 14:18:10 -0400
commit0108f9f18df9273b88c2c2a1f7fecb29926ea04d (patch)
tree20a97ed459be3ed3cd0df0f72a9c77a247957b4e /libs/ardour/track.cc
parent8a6b23f28ffc11e66b65b513729493d8d9c37c6b (diff)
add the Tracks version of Track::monitoring_state()
This drastically-stripped down version of the Ardour original is used only when USE_TRACKS_CODE_FEATURES is defined. It doesn't respond to many aspects/features of libardour.
Diffstat (limited to 'libs/ardour/track.cc')
-rw-r--r--libs/ardour/track.cc61
1 files changed, 61 insertions, 0 deletions
diff --git a/libs/ardour/track.cc b/libs/ardour/track.cc
index 92ea993470..2d46c60132 100644
--- a/libs/ardour/track.cc
+++ b/libs/ardour/track.cc
@@ -930,6 +930,65 @@ 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
{
@@ -995,6 +1054,8 @@ Track::monitoring_state () const
return MonitoringSilence;
}
+#endif
+
void
Track::maybe_declick (BufferSet& bufs, framecnt_t nframes, int declick)
{