Mercurial > hg > svcore
comparison data/fileio/WavFileReader.cpp @ 1326:54af1e21705c 3.0-integration
Update to use bqvec allocator for float vectors
author | Chris Cannam |
---|---|
date | Tue, 13 Dec 2016 15:23:21 +0000 |
parents | 0a9193dc136b |
children | c380e56c95f5 |
comparison
equal
deleted
inserted
replaced
1325:3aea4f7617bb | 1326:54af1e21705c |
---|---|
127 { | 127 { |
128 updateFrameCount(); | 128 updateFrameCount(); |
129 m_updating = false; | 129 m_updating = false; |
130 } | 130 } |
131 | 131 |
132 vector<float> | 132 floatvec_t |
133 WavFileReader::getInterleavedFrames(sv_frame_t start, sv_frame_t count) const | 133 WavFileReader::getInterleavedFrames(sv_frame_t start, sv_frame_t count) const |
134 { | 134 { |
135 static HitCount lastRead("WavFileReader: last read"); | 135 static HitCount lastRead("WavFileReader: last read"); |
136 | 136 |
137 if (count == 0) return {}; | 137 if (count == 0) return {}; |
173 | 173 |
174 if (sf_seek(m_file, start, SEEK_SET) < 0) { | 174 if (sf_seek(m_file, start, SEEK_SET) < 0) { |
175 return {}; | 175 return {}; |
176 } | 176 } |
177 | 177 |
178 vector<float> data; | 178 floatvec_t data; |
179 sv_frame_t n = count * m_fileInfo.channels; | 179 sv_frame_t n = count * m_fileInfo.channels; |
180 data.resize(n); | 180 data.resize(n); |
181 | 181 |
182 m_lastStart = start; | 182 m_lastStart = start; |
183 m_lastCount = count; | 183 m_lastCount = count; |