comparison data/model/WritableWaveFileModel.cpp @ 1086:9f4505ac9072

Tidy dense time-value model API a bit; add first simple unit test for FFT model
author Chris Cannam
date Wed, 10 Jun 2015 17:06:02 +0100
parents 0fd3661bcfff
children 4d9816ba0ebe b9faee02afa5
comparison
equal deleted inserted replaced
1085:bf6f64dabe73 1086:9f4505ac9072
176 if (!m_model || m_model->getChannelCount() == 0) return 0; 176 if (!m_model || m_model->getChannelCount() == 0) return 0;
177 return m_model->getData(channel, start, count, buffer); 177 return m_model->getData(channel, start, count, buffer);
178 } 178 }
179 179
180 sv_frame_t 180 sv_frame_t
181 WritableWaveFileModel::getData(int channel, sv_frame_t start, sv_frame_t count, 181 WritableWaveFileModel::getMultiChannelData(int fromchannel, int tochannel,
182 double *buffer) const 182 sv_frame_t start, sv_frame_t count,
183 float **buffers) const
183 { 184 {
184 if (!m_model || m_model->getChannelCount() == 0) return 0; 185 if (!m_model || m_model->getChannelCount() == 0) return 0;
185 return m_model->getData(channel, start, count, buffer); 186 return m_model->getMultiChannelData(fromchannel, tochannel, start, count, buffers);
186 }
187
188 sv_frame_t
189 WritableWaveFileModel::getData(int fromchannel, int tochannel,
190 sv_frame_t start, sv_frame_t count,
191 float **buffers) const
192 {
193 if (!m_model || m_model->getChannelCount() == 0) return 0;
194 return m_model->getData(fromchannel, tochannel, start, count, buffers);
195 } 187 }
196 188
197 int 189 int
198 WritableWaveFileModel::getSummaryBlockSize(int desired) const 190 WritableWaveFileModel::getSummaryBlockSize(int desired) const
199 { 191 {