comparison plugins/DWT.cpp @ 214:23b2a2f93c5a

Merge from branch MSVC
author Chris Cannam <c.cannam@qmul.ac.uk>
date Fri, 27 Apr 2018 15:48:50 +0100
parents 4697db8b91f8
children
comparison
equal deleted inserted replaced
186:8dca49290db9 214:23b2a2f93c5a
91 bool 91 bool
92 DWT::initialise(size_t channels, size_t stepSize, size_t blockSize) 92 DWT::initialise(size_t channels, size_t stepSize, size_t blockSize)
93 { 93 {
94 if (channels < getMinChannelCount() || 94 if (channels < getMinChannelCount() ||
95 channels > getMaxChannelCount()) return false; 95 channels > getMaxChannelCount()) return false;
96
97 if (m_inputSampleRate > 1000000) { // somewhat arbitrarily
98 std::cerr << "DWT::initialise: ERROR: Maximum sample rate exceeded" << std::endl;
99 return false;
100 }
96 101
97 if ((1U << m_scales) > blockSize) { 102 if ((1U << m_scales) > blockSize) {
98 std::cerr << "DWT::initialise: ERROR: Block size must be at least 2^scales (specified block size " << blockSize << " < " << (1 << m_scales) << ")" << std::endl; 103 std::cerr << "DWT::initialise: ERROR: Block size must be at least 2^scales (specified block size " << blockSize << " < " << (1 << m_scales) << ")" << std::endl;
99 return false; 104 return false;
100 } 105 }