Mercurial > hg > qm-vamp-plugins
diff 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 |
line wrap: on
line diff
--- a/plugins/ConstantQSpectrogram.cpp Mon Feb 05 19:07:29 2018 +0000 +++ b/plugins/ConstantQSpectrogram.cpp Tue Feb 06 21:11:43 2018 +0000 @@ -213,6 +213,11 @@ if (channels < getMinChannelCount() || channels > getMaxChannelCount()) return false; + if (m_inputSampleRate > 384000) { + std::cerr << "ConstantQSpectrogram::initialise: Maximum input sample rate is 384000" << std::endl; + return false; + } + setupConfig(); m_cq = new ConstantQ(m_config);