Mercurial > hg > constant-q-cpp
diff src/ConstantQ.cpp @ 147:1060a19e2334
Report validity of CQKernel construction, and avoid NaN values for invalid parameters. Also documentation.
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Thu, 10 Jul 2014 12:19:39 +0100 |
parents | ff8ae033615f |
children | 242bf7bc38ce |
line wrap: on
line diff
--- a/src/ConstantQ.cpp Fri Jun 20 10:33:11 2014 +0100 +++ b/src/ConstantQ.cpp Thu Jul 10 12:19:39 2014 +0100 @@ -92,6 +92,10 @@ m_kernel = new CQKernel(m_inparams); m_p = m_kernel->getProperties(); + if (!m_kernel->isValid()) { + return; + } + // Use exact powers of two for resampling rates. They don't have // to be related to our actual samplerate: the resampler only // cares about the ratio, but it only accepts integer source and