Mercurial > hg > qm-vamp-plugins
changeset 210:4697db8b91f8
Avoid very high sample rates - proving problematic in win32 build
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Fri, 27 Apr 2018 10:55:00 +0100 |
parents | b987b2775a2e |
children | 47105e880e90 |
files | plugins/DWT.cpp |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/DWT.cpp Thu Feb 08 15:43:13 2018 +0000 +++ b/plugins/DWT.cpp Fri Apr 27 10:55:00 2018 +0100 @@ -93,6 +93,11 @@ { if (channels < getMinChannelCount() || channels > getMaxChannelCount()) return false; + + if (m_inputSampleRate > 1000000) { // somewhat arbitrarily + std::cerr << "DWT::initialise: ERROR: Maximum sample rate exceeded" << std::endl; + return false; + } if ((1U << m_scales) > blockSize) { std::cerr << "DWT::initialise: ERROR: Block size must be at least 2^scales (specified block size " << blockSize << " < " << (1 << m_scales) << ")" << std::endl;