mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-21 04:45:58 +01:00
De-click External Sends
This commit is contained in:
parent
6a5215db37
commit
de042dcde7
2 changed files with 16 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue