diff --git a/libs/ardour/disk_reader.cc b/libs/ardour/disk_reader.cc index 325bdca974..b62fe04ecd 100644 --- a/libs/ardour/disk_reader.cc +++ b/libs/ardour/disk_reader.cc @@ -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