comparison data/fileio/WavFileReader.cpp @ 1103:e86a7ea3dc38 simple-fft-model

Fix a cache-related dumbitude
author Chris Cannam
date Tue, 16 Jun 2015 20:28:23 +0100
parents 4d9816ba0ebe
children 457a1a619c5f
comparison
equal deleted inserted replaced
1102:12f3b48668d4 1103:e86a7ea3dc38
155 155
156 vector<float> data; 156 vector<float> data;
157 sv_frame_t n = count * m_fileInfo.channels; 157 sv_frame_t n = count * m_fileInfo.channels;
158 data.resize(n); 158 data.resize(n);
159 159
160 m_buffer = data;
161 m_lastStart = start; 160 m_lastStart = start;
162 m_lastCount = count; 161 m_lastCount = count;
163 162
164 sf_count_t readCount = 0; 163 sf_count_t readCount = 0;
165 if ((readCount = sf_readf_float(m_file, data.data(), count)) < 0) { 164 if ((readCount = sf_readf_float(m_file, data.data(), count)) < 0) {
166 return {}; 165 return {};
167 } 166 }
168 167
168 m_buffer = data;
169 return data; 169 return data;
170 } 170 }
171 171
172 void 172 void
173 WavFileReader::getSupportedExtensions(set<QString> &extensions) 173 WavFileReader::getSupportedExtensions(set<QString> &extensions)