fix crash when copy'ing latent plugins
[ardour.git] / libs / ardour / amp.cc
index a1ffad8e051beeeb9c37293c64cc114760fae3b5..d86362aa0d37d19198d8a8c840441c8145d133fe 100644 (file)
@@ -31,7 +31,7 @@
 #include "ardour/rc_configuration.h"
 #include "ardour/session.h"
 
-#include "i18n.h"
+#include "pbd/i18n.h"
 
 using namespace ARDOUR;
 using namespace PBD;
@@ -71,7 +71,7 @@ Amp::configure_io (ChanCount in, ChanCount out)
 }
 
 void
-Amp::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, pframes_t nframes, bool)
+Amp::run (BufferSet& bufs, framepos_t /*start_frame*/, framepos_t /*end_frame*/, double /*speed*/, pframes_t nframes, bool)
 {
        if (!_active && !_pending_active) {
                return;
@@ -388,7 +388,7 @@ Amp::setup_gain_automation (framepos_t start_frame, framepos_t end_frame, framec
                assert (_gain_automation_buffer);
                _apply_gain_automation = _gain_control->list()->curve().rt_safe_get_vector (
                        start_frame, end_frame, _gain_automation_buffer, nframes);
-               if (start_frame != _current_automation_frame) {
+               if (start_frame != _current_automation_frame && _session.bounce_processing ()) {
                        _current_gain = _gain_automation_buffer[0];
                }
                _current_automation_frame = end_frame;