summaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2017-09-19 04:54:42 +0200
committerRobin Gareus <robin@gareus.org>2017-09-19 04:54:42 +0200
commit29e553ab86ecb8112914b773b60cdbdcb855a750 (patch)
treef0eadb90468582f66c113617c7cd265f5a3ed62c /libs
parent1ec471c961c328ca4c585d35f9e567135f301d2d (diff)
Amend c8a9b28d3 and 40aebce. Fix gain automation edge-cases:
* drop Trim/Fader automation for bypassed processor * Trim/Fader automation for Busses is always active when rolling
Diffstat (limited to 'libs')
-rw-r--r--libs/ardour/amp.cc7
-rw-r--r--libs/ardour/ardour/amp.h2
-rw-r--r--libs/ardour/route.cc2
3 files changed, 7 insertions, 4 deletions
diff --git a/libs/ardour/amp.cc b/libs/ardour/amp.cc
index 5533e4e045..94d3f4617d 100644
--- a/libs/ardour/amp.cc
+++ b/libs/ardour/amp.cc
@@ -78,6 +78,8 @@ void
Amp::run (BufferSet& bufs, samplepos_t /*start_sample*/, samplepos_t /*end_sample*/, double /*speed*/, pframes_t nframes, bool)
{
if (!_active && !_pending_active) {
+ /* disregard potentially prepared gain-automation. */
+ _apply_gain_automation = false;
return;
}
@@ -121,7 +123,7 @@ Amp::run (BufferSet& bufs, samplepos_t /*start_sample*/, samplepos_t /*end_sampl
}
/* used it, don't do it again until setup_gain_automation() is
- called successfully.
+ * called successfully.
*/
_apply_gain_automation = false;
@@ -389,6 +391,9 @@ Amp::set_state (const XMLNode& node, int version)
/** Write gain automation for this cycle into the buffer previously passed in to
* set_gain_automation_buffer (if we are in automation playback mode and the
* transport is rolling).
+ *
+ * After calling this, the gain-automation buffer is valid for the next run.
+ * so make sure to call ::run() which invalidates the buffer again.
*/
void
Amp::setup_gain_automation (samplepos_t start_sample, samplepos_t end_sample, samplecnt_t nframes)
diff --git a/libs/ardour/ardour/amp.h b/libs/ardour/ardour/amp.h
index 89c9c19b91..c0ff59d9e7 100644
--- a/libs/ardour/ardour/amp.h
+++ b/libs/ardour/ardour/amp.h
@@ -53,8 +53,6 @@ public:
void setup_gain_automation (samplepos_t start_sample, samplepos_t end_sample, samplecnt_t nframes);
- bool apply_gain_automation() const { return _apply_gain_automation; }
-
XMLNode& state (bool full);
int set_state (const XMLNode&, int version);
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 598efec633..9ad7510f6d 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -3620,7 +3620,7 @@ Route::roll (pframes_t nframes, samplepos_t start_sample, samplepos_t end_sample
_meter->run (bufs, start_sample, end_sample, 1.0 /*speed()*/, nframes, true);
}
- passthru (bufs, start_sample, end_sample, nframes, declick, ((_disk_writer && !_disk_writer->record_enabled()) && _session.transport_rolling()));
+ passthru (bufs, start_sample, end_sample, nframes, declick, (!_disk_writer || !_disk_writer->record_enabled()) && _session.transport_rolling());
if ((_disk_reader && _disk_reader->need_butler()) || (_disk_writer && _disk_writer->need_butler())) {
need_butler = true;