# HG changeset patch # User Chris Cannam # Date 1517951503 0 # Node ID 28850f3cf65bbf03c4d307d947443bfadd3a66a5 # Parent 3fcced536a9ecc910b641d25f3c040a095939193 Reject troublesome sample rates diff -r 3fcced536a9e -r 28850f3cf65b plugins/ChromagramPlugin.cpp --- a/plugins/ChromagramPlugin.cpp Mon Feb 05 19:07:29 2018 +0000 +++ b/plugins/ChromagramPlugin.cpp Tue Feb 06 21:11:43 2018 +0000 @@ -216,6 +216,11 @@ if (channels < getMinChannelCount() || channels > getMaxChannelCount()) return false; + if (m_inputSampleRate > 384000) { + std::cerr << "ChromagramPlugin::initialise: Maximum input sample rate is 384000" << std::endl; + return false; + } + m_chromagram = new Chromagram(m_config); m_binsums = vector(m_config.BPO); diff -r 3fcced536a9e -r 28850f3cf65b plugins/ConstantQSpectrogram.cpp --- 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);