comparison data/fileio/WavFileWriter.cpp @ 300:5877d68815c7

* Change WaveFileModel API from getValues(start,end) to getData(start,count). It's much less error-prone to pass in frame counts instead of start/end locations. Should have done this ages ago. This closes #1794563. * Add option to apply a transform to only the selection region, instead of the whole audio. * (to make the above work properly) Add start frame offset to wave models
author Chris Cannam
date Mon, 01 Oct 2007 13:48:38 +0000
parents 91fdc752e540
children 920e3880f7b4
comparison
equal deleted inserted replaced
299:576be0d0d218 300:5877d68815c7
101 for (size_t f = f0; f < f1; f += bs) { 101 for (size_t f = f0; f < f1; f += bs) {
102 102
103 size_t n = std::min(bs, f1 - f); 103 size_t n = std::min(bs, f1 - f);
104 104
105 for (int c = 0; c < int(m_channels); ++c) { 105 for (int c = 0; c < int(m_channels); ++c) {
106 source->getValues(c, f, f + n, ub); 106 source->getData(c, f, n, ub);
107 for (size_t i = 0; i < n; ++i) { 107 for (size_t i = 0; i < n; ++i) {
108 ib[i * m_channels + c] = ub[i]; 108 ib[i * m_channels + c] = ub[i];
109 } 109 }
110 } 110 }
111 111