Fix multi-channel de-click
_declick_amp gain needs to be reset for each channel before the test (_declick_amp.gain() != target_gain) if de-clicking is needed.
This commit is contained in:
parent
78d5e6af28
commit
53b1d17c60
@ -362,6 +362,11 @@ DiskReader::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_samp
|
||||
}
|
||||
}
|
||||
|
||||
/* reset _declick_amp to the correct gain before processing this channel. */
|
||||
if (declick_out) {
|
||||
_declick_amp.set_gain (initial_declick_gain);
|
||||
}
|
||||
|
||||
if (!declick_out) {
|
||||
|
||||
const samplecnt_t total = chaninfo->rbuf->read (disk_buf.data(), disk_samples_to_consume);
|
||||
@ -395,11 +400,6 @@ DiskReader::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_samp
|
||||
}
|
||||
}
|
||||
|
||||
/* reset _declick_amp to the correct gain before
|
||||
* processing this channel.
|
||||
*/
|
||||
|
||||
_declick_amp.set_gain (initial_declick_gain);
|
||||
_declick_amp.apply_gain (disk_buf, nframes, target_gain);
|
||||
|
||||
/* _declick_amp is now left with the correct gain after
|
||||
|
Loading…
Reference in New Issue
Block a user