summaryrefslogtreecommitdiff
path: root/libs/ardour/sndfilesource.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-02-22 11:11:53 -0500
committerPaul Davis <paul@linuxaudiosystems.com>2015-02-22 11:12:11 -0500
commit10e183f518f1a26c081afa191f30968f40211b0f (patch)
tree4399448dcbf6aaaa7a484bc90d4a44ee25388963 /libs/ardour/sndfilesource.cc
parentb40a305b5aaf1b5365d7146f6d097b8b1a1ff357 (diff)
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.
Diffstat (limited to 'libs/ardour/sndfilesource.cc')
-rw-r--r--libs/ardour/sndfilesource.cc6
1 files 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;
}