Mercurial > hg > svcore
diff data/model/test/MockWaveModel.cpp @ 1429:48e9f538e6e9
Untabify
author | Chris Cannam |
---|---|
date | Thu, 01 Mar 2018 18:02:22 +0000 |
parents | 54af1e21705c |
children | a12fd0456f0c |
line wrap: on
line diff
--- a/data/model/test/MockWaveModel.cpp Thu Mar 01 14:43:40 2018 +0000 +++ b/data/model/test/MockWaveModel.cpp Thu Mar 01 18:02:22 2018 +0000 @@ -22,7 +22,7 @@ MockWaveModel::MockWaveModel(vector<Sort> sorts, int length, int pad) { for (auto sort: sorts) { - m_data.push_back(generate(sort, length, pad)); + m_data.push_back(generate(sort, length, pad)); } } @@ -36,11 +36,11 @@ floatvec_t data; while (i < count) { - sv_frame_t idx = start + i; - if (!in_range_for(m_data[channel], idx)) break; - data.push_back(m_data[channel][idx]); -// cerr << data[i] << " "; - ++i; + sv_frame_t idx = start + i; + if (!in_range_for(m_data[channel], idx)) break; + data.push_back(m_data[channel][idx]); +// cerr << data[i] << " "; + ++i; } // cerr << endl; @@ -50,7 +50,7 @@ vector<floatvec_t> MockWaveModel::getMultiChannelData(int fromchannel, int tochannel, - sv_frame_t start, sv_frame_t count) const + sv_frame_t start, sv_frame_t count) const { vector<floatvec_t> data(tochannel - fromchannel + 1); @@ -72,17 +72,17 @@ for (int i = 0; i < length; ++i) { - double v = 0.0; - - switch (sort) { - case DC: v = 1.0; break; - case Sine: v = sin((2.0 * M_PI / 8.0) * i); break; - case Cosine: v = cos((2.0 * M_PI / 8.0) * i); break; - case Nyquist: v = (i % 2) * 2 - 1; break; - case Dirac: v = (i == 0) ? 1.0 : 0.0; break; - } + double v = 0.0; + + switch (sort) { + case DC: v = 1.0; break; + case Sine: v = sin((2.0 * M_PI / 8.0) * i); break; + case Cosine: v = cos((2.0 * M_PI / 8.0) * i); break; + case Nyquist: v = (i % 2) * 2 - 1; break; + case Dirac: v = (i == 0) ? 1.0 : 0.0; break; + } - data.push_back(float(v)); + data.push_back(float(v)); } for (int i = 0; i < pad; ++i) {