Fix alignment and de-click when monitoring changes while playing

Previously it was possible that
 * declick_out = true,
 * target_gain == 0, cur_gain != 0 (fade out active)
 * speed != 0, disk_samples_to_consume > 0.

So the disk-reader advanced the playback_sample, but since
declick_out is active, the read from the ringbuffer was not committed.
This commit is contained in:
Robin Gareus 2020-05-04 21:48:47 +02:00
parent 744b85679b
commit a6f95b21fc
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04

View file

@ -333,6 +333,7 @@ DiskReader::run (BufferSet& bufs, samplepos_t start_sample, samplepos_t end_samp
ms = MonitorState (ms | MonitoringDisk);
assert (result_required);
result_required = true;
disk_samples_to_consume = 0; // non-committing read
} else {
_declick_offs = 0;
}