comparison TempogramPlugin.cpp @ 60:ac1a75151fc9 tip

isnan(int) is meaningless, and msvc refuses it as ambiguous
author Chris Cannam
date Wed, 18 Dec 2019 16:47:10 +0000
parents f1c128d0f78c
children
comparison
equal deleted inserted replaced
59:02721bb9c4f0 60:ac1a75151fc9
11 License, or (at your option) any later version. See the file 11 License, or (at your option) any later version. See the file
12 COPYING included with this distribution for more information. 12 COPYING included with this distribution for more information.
13 */ 13 */
14 14
15 #include "TempogramPlugin.h" 15 #include "TempogramPlugin.h"
16
17 #include <algorithm>
16 18
17 using Vamp::FFT; 19 using Vamp::FFT;
18 using Vamp::RealTime; 20 using Vamp::RealTime;
19 using namespace std; 21 using namespace std;
20 22
359 d1.identifier = "cyclicTempogram"; 361 d1.identifier = "cyclicTempogram";
360 d1.name = "Cyclic Tempogram"; 362 d1.name = "Cyclic Tempogram";
361 d1.description = "Cyclic tempogram calculated by \"octave folding\" the DFT tempogram"; 363 d1.description = "Cyclic tempogram calculated by \"octave folding\" the DFT tempogram";
362 d1.unit = ""; 364 d1.unit = "";
363 d1.hasFixedBinCount = true; 365 d1.hasFixedBinCount = true;
364 d1.binCount = m_cyclicTempogramOctaveDivider > 0 && !isnan(m_cyclicTempogramOctaveDivider) ? m_cyclicTempogramOctaveDivider : 0; 366 d1.binCount = m_cyclicTempogramOctaveDivider > 0 ? m_cyclicTempogramOctaveDivider : 0;
365 d1.hasKnownExtents = false; 367 d1.hasKnownExtents = false;
366 d1.isQuantized = false; 368 d1.isQuantized = false;
367 d1.sampleType = OutputDescriptor::FixedSampleRate; 369 d1.sampleType = OutputDescriptor::FixedSampleRate;
368 d_sampleRate = tempogramInputSampleRate/m_tempogramHopSize; 370 d_sampleRate = tempogramInputSampleRate/m_tempogramHopSize;
369 d1.sampleRate = d_sampleRate > 0.0 && !isnan(d_sampleRate) ? d_sampleRate : 0; 371 d1.sampleRate = d_sampleRate > 0.0 && !isnan(d_sampleRate) ? d_sampleRate : 0;