Fix rendering of region waveform left-edge
The left-most part may be a partial block of a given "sample per pixel" range. Also previously there was an off-by-one [block] in case sample_pos was an even multiple of samples_per_visual_peak.
This commit is contained in:
parent
a176efee02
commit
a582b24fcd
@ -647,9 +647,8 @@ AudioSource::read_peaks_with_fpp (PeakData *peaks, samplecnt_t npeaks, samplepos
|
|||||||
samplecnt_t chunksize = (samplecnt_t) min (cnt, (samplecnt_t) 4096);
|
samplecnt_t chunksize = (samplecnt_t) min (cnt, (samplecnt_t) 4096);
|
||||||
boost::scoped_array<Sample> raw_staging(new Sample[chunksize]);
|
boost::scoped_array<Sample> raw_staging(new Sample[chunksize]);
|
||||||
|
|
||||||
samplepos_t sample_pos = start;
|
double pixel_pos = start / samples_per_visual_peak;
|
||||||
double pixel_pos = floor (sample_pos / samples_per_visual_peak);
|
double next_pixel_pos = 1.0 + floor (pixel_pos);
|
||||||
double next_pixel_pos = ceil (sample_pos / samples_per_visual_peak);
|
|
||||||
double pixels_per_sample = 1.0 / samples_per_visual_peak;
|
double pixels_per_sample = 1.0 / samples_per_visual_peak;
|
||||||
|
|
||||||
xmin = 1.0;
|
xmin = 1.0;
|
||||||
|
Loading…
Reference in New Issue
Block a user