comparison data/fileio/WavFileWriter.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 3aea4f7617bb
children b3cb0edc25cd
comparison
equal deleted inserted replaced
1325:3aea4f7617bb 1326:54af1e21705c
139 sv_frame_t f0(i->getStartFrame()), f1(i->getEndFrame()); 139 sv_frame_t f0(i->getStartFrame()), f1(i->getEndFrame());
140 140
141 for (sv_frame_t f = f0; f < f1; f += bs) { 141 for (sv_frame_t f = f0; f < f1; f += bs) {
142 142
143 sv_frame_t n = min(bs, f1 - f); 143 sv_frame_t n = min(bs, f1 - f);
144 vector<float> interleaved(n * m_channels, 0.f); 144 floatvec_t interleaved(n * m_channels, 0.f);
145 145
146 for (int c = 0; c < int(m_channels); ++c) { 146 for (int c = 0; c < int(m_channels); ++c) {
147 vector<float> chanbuf = source->getData(c, f, n); 147 auto chanbuf = source->getData(c, f, n);
148 for (int i = 0; in_range_for(chanbuf, i); ++i) { 148 for (int i = 0; in_range_for(chanbuf, i); ++i) {
149 interleaved[i * m_channels + c] = chanbuf[i]; 149 interleaved[i * m_channels + c] = chanbuf[i];
150 } 150 }
151 } 151 }
152 152