From 10e183f518f1a26c081afa191f30968f40211b0f Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Sun, 22 Feb 2015 11:11:53 -0500 Subject: [PATCH] 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. --- libs/ardour/sndfilesource.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/ardour/sndfilesource.cc b/libs/ardour/sndfilesource.cc index b1e5cc1d4c..b93047761b 100644 --- a/libs/ardour/sndfilesource.cc +++ b/libs/ardour/sndfilesource.cc @@ -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; }