13
0

NO-OP: whitespace

This commit is contained in:
Robin Gareus 2019-07-29 03:28:53 +02:00
parent 6d4b94df13
commit a176efee02
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -520,13 +520,13 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, samplecnt_t npeaks, samplepos
DEBUG_TRACE (DEBUG::Peaks, "DOWNSAMPLE\n"); DEBUG_TRACE (DEBUG::Peaks, "DOWNSAMPLE\n");
/* the caller wants: /* the caller wants:
*
- more samples-per-peak (lower resolution) than the peakfile, or to put it another way, * - more samples-per-peak (lower resolution) than the peakfile, or to put it another way,
- less peaks than the peakfile holds for the same range * - less peaks than the peakfile holds for the same range
*
So, read a block into a staging area, and then downsample from there. * So, read a block into a staging area, and then downsample from there.
*
to avoid confusion, I'll refer to the requested peaks as visual_peaks and the peakfile peaks as stored_peaks * to avoid confusion, I'll refer to the requested peaks as visual_peaks and the peakfile peaks as stored_peaks
*/ */
const samplecnt_t chunksize = (samplecnt_t) expected_peaks; // we read all the peaks we need in one hit. const samplecnt_t chunksize = (samplecnt_t) expected_peaks; // we read all the peaks we need in one hit.
@ -632,12 +632,12 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, samplecnt_t npeaks, samplepos
DEBUG_TRACE (DEBUG::Peaks, "UPSAMPLE\n"); DEBUG_TRACE (DEBUG::Peaks, "UPSAMPLE\n");
/* the caller wants /* the caller wants
*
- less samples-per-peak (more resolution) * - less samples-per-peak (more resolution)
- more peaks than stored in the Peakfile * - more peaks than stored in the Peakfile
*
So, fetch data from the raw source, and generate peak * So, fetch data from the raw source, and generate peak
data on the fly. * data on the fly.
*/ */
samplecnt_t samples_read = 0; samplecnt_t samples_read = 0;
@ -664,10 +664,10 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, samplecnt_t npeaks, samplepos
if (current_sample >= _length) { if (current_sample >= _length) {
/* hmm, error condition - we've reached the end of the file /* hmm, error condition - we've reached the end of the file
without generating all the peak data. cook up a zero-filled * without generating all the peak data. cook up a zero-filled
data buffer and then use it. this is simpler than * data buffer and then use it. this is simpler than
adjusting zero_fill and read_npeaks and then breaking out of * adjusting zero_fill and read_npeaks and then breaking out of
this loop early * this loop early
*/ */
memset (raw_staging.get(), 0, sizeof (Sample) * chunksize); memset (raw_staging.get(), 0, sizeof (Sample) * chunksize);