Fix fader/trim automation after locate
First see31c6f66d9b
and5cb6e1046b
. It worked previously due to `AutomationControl::get_value` evaluating automation, which was removed in5cb6e1046b
in favor of properly using latency compensated evaluation. However due to31c6f66d9b
, fader and trim automation were never evaluated on locate, only during playback via `Amp::setup_gain_automation`. This fixes a case where gain is incorrect after a locate. The amp still has the gain from before the locate, and when starting playback ramps to the new gain.
This commit is contained in:
parent
ab0d2dce6f
commit
c3d90f415c
@ -73,7 +73,7 @@ Amp::configure_io (ChanCount in, ChanCount out)
|
||||
}
|
||||
|
||||
void
|
||||
Amp::run (BufferSet& bufs, samplepos_t /*start_sample*/, samplepos_t /*end_sample*/, double /*speed*/, pframes_t nframes, bool)
|
||||
Amp::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t /*end_sample*/, double /*speed*/, pframes_t nframes, bool)
|
||||
{
|
||||
if (!check_active()) {
|
||||
/* disregard potentially prepared gain-automation. */
|
||||
@ -129,6 +129,8 @@ Amp::run (BufferSet& bufs, samplepos_t /*start_sample*/, samplepos_t /*end_sampl
|
||||
|
||||
} else { /* manual (scalar) gain */
|
||||
|
||||
_gain_control->automation_run (start_sample, nframes);
|
||||
|
||||
gain_t const target_gain = _gain_control->get_value();
|
||||
|
||||
if (fabsf (_current_gain - target_gain) >= GAIN_COEFF_DELTA) {
|
||||
@ -384,7 +386,7 @@ Amp::setup_gain_automation (samplepos_t start_sample, samplepos_t end_sample, sa
|
||||
|
||||
_apply_gain_automation = _gain_control->get_masters_curve ( start_sample, end_sample, _gain_automation_buffer, nframes);
|
||||
|
||||
if (start_sample != _current_automation_sample && _session.bounce_processing ()) {
|
||||
if (start_sample != _current_automation_sample) {
|
||||
_current_gain = _gain_automation_buffer[0];
|
||||
}
|
||||
_current_automation_sample = end_sample;
|
||||
|
Loading…
Reference in New Issue
Block a user