De-click External Sends
This commit is contained in:
@@ -322,7 +322,11 @@ Delivery::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sample
|
||||
{
|
||||
assert (_output);
|
||||
|
||||
if (!check_active()) {
|
||||
/* Do not use check_active() here, because we need to continue running
|
||||
* until the gain has gone to zero.
|
||||
*/
|
||||
|
||||
if (!_active && !_pending_active) {
|
||||
_output->silence (nframes);
|
||||
return;
|
||||
}
|
||||
@@ -347,6 +351,11 @@ Delivery::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sample
|
||||
// which cannot do this.
|
||||
|
||||
tgain = target_gain ();
|
||||
const bool converged = fabsf (_current_gain - tgain) < GAIN_COEFF_DELTA;
|
||||
|
||||
if (converged) {
|
||||
_active = _pending_active;
|
||||
}
|
||||
|
||||
if (tgain != _current_gain) {
|
||||
/* target gain has changed */
|
||||
|
||||
@@ -151,7 +151,7 @@ Send::deactivate ()
|
||||
samplecnt_t
|
||||
Send::signal_latency () const
|
||||
{
|
||||
if (!_pending_active) {
|
||||
if (!_pending_active && !_active) {
|
||||
return 0;
|
||||
}
|
||||
if (_delay_out > _delay_in) {
|
||||
@@ -242,7 +242,11 @@ Send::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_sample, do
|
||||
return;
|
||||
}
|
||||
|
||||
if (!check_active()) {
|
||||
/* Do not use check_active() here, because we need to continue running
|
||||
* until the gain has gone to zero.
|
||||
*/
|
||||
|
||||
if (!_active && !_pending_active) {
|
||||
_meter->reset ();
|
||||
_output->silence (nframes);
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user