comparison plugins/ConstantQSpectrogram.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 1a13ddc08313
children c9c562f37dd7
comparison
equal deleted inserted replaced
198:3fcced536a9e 199:28850f3cf65b
211 } 211 }
212 212
213 if (channels < getMinChannelCount() || 213 if (channels < getMinChannelCount() ||
214 channels > getMaxChannelCount()) return false; 214 channels > getMaxChannelCount()) return false;
215 215
216 if (m_inputSampleRate > 384000) {
217 std::cerr << "ConstantQSpectrogram::initialise: Maximum input sample rate is 384000" << std::endl;
218 return false;
219 }
220
216 setupConfig(); 221 setupConfig();
217 222
218 m_cq = new ConstantQ(m_config); 223 m_cq = new ConstantQ(m_config);
219 m_bins = m_cq->getK(); 224 m_bins = m_cq->getK();
220 m_cq->sparsekernel(); 225 m_cq->sparsekernel();