comparison data/model/FFTModel.cpp @ 1428:87ae75da6527

Convert some cerrs to SVCERRs. Apart from anything else, this makes MSVC2017 happy
author Chris Cannam
date Thu, 01 Mar 2018 14:43:40 +0000
parents fad8f533ca13
children 48e9f538e6e9
comparison
equal deleted inserted replaced
1427:622d193a00dc 1428:87ae75da6527
17 #include "DenseTimeValueModel.h" 17 #include "DenseTimeValueModel.h"
18 18
19 #include "base/Profiler.h" 19 #include "base/Profiler.h"
20 #include "base/Pitch.h" 20 #include "base/Pitch.h"
21 #include "base/HitCount.h" 21 #include "base/HitCount.h"
22 #include "base/Debug.h"
22 23
23 #include <algorithm> 24 #include <algorithm>
24 25
25 #include <cassert> 26 #include <cassert>
26 #include <deque> 27 #include <deque>
50 while (m_cached.size() < m_cacheSize) { 51 while (m_cached.size() < m_cacheSize) {
51 m_cached.push_back({ -1, cvec(m_fftSize / 2 + 1) }); 52 m_cached.push_back({ -1, cvec(m_fftSize / 2 + 1) });
52 } 53 }
53 54
54 if (m_windowSize > m_fftSize) { 55 if (m_windowSize > m_fftSize) {
55 cerr << "ERROR: FFTModel::FFTModel: window size (" << m_windowSize 56 SVCERR << "ERROR: FFTModel::FFTModel: window size (" << m_windowSize
56 << ") must be at least FFT size (" << m_fftSize << ")" << endl; 57 << ") must be at least FFT size (" << m_fftSize << ")" << endl;
57 throw invalid_argument("FFTModel window size must be at least FFT size"); 58 throw invalid_argument("FFTModel window size must be at least FFT size");
58 } 59 }
59 60
60 m_fft.initFloat(); 61 m_fft.initFloat();
61 62
70 71
71 void 72 void
72 FFTModel::sourceModelAboutToBeDeleted() 73 FFTModel::sourceModelAboutToBeDeleted()
73 { 74 {
74 if (m_model) { 75 if (m_model) {
75 cerr << "FFTModel[" << this << "]::sourceModelAboutToBeDeleted(" << m_model << ")" << endl; 76 SVDEBUG << "FFTModel[" << this << "]::sourceModelAboutToBeDeleted(" << m_model << ")" << endl;
76 m_model = 0; 77 m_model = 0;
77 } 78 }
78 } 79 }
79 80
80 int 81 int