13
0

fix two other potential issues with leftover 32 bit integers when reading from sndfilesource.

It is less likely that these would cause issues because the
variables involved define the size of the data read, which
is almost certainly less than the 32 bit limit (i.e. they are
not positional). But to keep things clean and to keep questions
at bay, make them 64 bit values.
This commit is contained in:
Paul Davis 2015-02-22 11:11:53 -05:00
parent b40a305b5a
commit 10e183f518

View File

@ -353,9 +353,9 @@ SndFileSource::read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) con
{
assert (cnt >= 0);
int32_t nread;
framecnt_t nread;
float *ptr;
uint32_t real_cnt;
framecnt_t real_cnt;
framepos_t file_cnt;
if (writable() && !_sndfile) {
@ -425,7 +425,7 @@ SndFileSource::read_unlocked (Sample *dst, framepos_t start, framecnt_t cnt) con
/* stride through the interleaved data */
for (int32_t n = 0; n < nread; ++n) {
for (framecnt_t n = 0; n < nread; ++n) {
dst[n] = *ptr;
ptr += _info.channels;
}