improve 2 DEBUG_TRACE messages associated with peakfile operations

This commit is contained in:
Paul Davis 2025-10-23 17:40:58 -06:00
parent 9a9000ada3
commit e5d95d0d06

View file

@ -1127,7 +1127,7 @@ AudioSource::compute_and_write_peaks (Sample const * buf, samplecnt_t first_samp
off_t target_length = blocksize * ((first_peak_byte + blocksize + 1) / blocksize);
if (endpos < target_length) {
DEBUG_TRACE(DEBUG::Peaks, string_compose ("Truncating Peakfile %1\n", _peakpath));
DEBUG_TRACE(DEBUG::Peaks, string_compose ("Truncating Peakfile A %1 to %2\n", _peakpath, target_length));
if (ftruncate (_peakfile_fd, target_length)) {
/* error doesn't actually matter so continue on without testing */
}
@ -1178,7 +1178,7 @@ AudioSource::truncate_peakfile ()
off_t end = lseek (_peakfile_fd, 0, SEEK_END);
if (end > _peak_byte_max) {
DEBUG_TRACE(DEBUG::Peaks, string_compose ("Truncating Peakfile %1\n", _peakpath));
DEBUG_TRACE(DEBUG::Peaks, string_compose ("Truncating Peakfile B %1 to %2\n", _peakpath, _peak_byte_max));
if (ftruncate (_peakfile_fd, _peak_byte_max)) {
error << string_compose (_("could not truncate peakfile %1 to %2 (error: %3)"),
_peakpath, _peak_byte_max, errno) << endmsg;