Mercurial > hg > qm-vamp-plugins
comparison plugins/ChromagramPlugin.cpp @ 199:28850f3cf65b
Reject troublesome sample rates
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Tue, 06 Feb 2018 21:11:43 +0000 |
parents | f96ea0e4b475 |
children | c9c562f37dd7 |
comparison
equal
deleted
inserted
replaced
198:3fcced536a9e | 199:28850f3cf65b |
---|---|
214 } | 214 } |
215 | 215 |
216 if (channels < getMinChannelCount() || | 216 if (channels < getMinChannelCount() || |
217 channels > getMaxChannelCount()) return false; | 217 channels > getMaxChannelCount()) return false; |
218 | 218 |
219 if (m_inputSampleRate > 384000) { | |
220 std::cerr << "ChromagramPlugin::initialise: Maximum input sample rate is 384000" << std::endl; | |
221 return false; | |
222 } | |
223 | |
219 m_chromagram = new Chromagram(m_config); | 224 m_chromagram = new Chromagram(m_config); |
220 m_binsums = vector<double>(m_config.BPO); | 225 m_binsums = vector<double>(m_config.BPO); |
221 | 226 |
222 for (int i = 0; i < m_config.BPO; ++i) { | 227 for (int i = 0; i < m_config.BPO; ++i) { |
223 m_binsums[i] = 0.0; | 228 m_binsums[i] = 0.0; |