comparison data/model/FFTModel.h @ 1784:4eac4bf35b45

More graceful handling of failure to construct FFT models in the case where the source model has already been deleted before this occurs
author Chris Cannam
date Tue, 17 Sep 2019 11:21:33 +0100
parents 6d6740b075c3
children dd51797e528e
comparison
equal deleted inserted replaced
1783:cf3eb6252f42 1784:4eac4bf35b45
76 Column getColumn(int x) const override; // magnitudes 76 Column getColumn(int x) const override; // magnitudes
77 virtual Column getPhases(int x) const; 77 virtual Column getPhases(int x) const;
78 QString getBinName(int n) const override; 78 QString getBinName(int n) const override;
79 bool shouldUseLogValueScale() const override { return true; } 79 bool shouldUseLogValueScale() const override { return true; }
80 int getCompletion() const override; 80 int getCompletion() const override;
81 virtual QString getError() const { return ""; } //!!!??? 81 virtual QString getError() const { return m_error; }
82 virtual sv_frame_t getFillExtent() const { return getEndFrame(); } 82 virtual sv_frame_t getFillExtent() const { return getEndFrame(); }
83 QString toDelimitedDataString(QString, DataExportOptions, 83 QString toDelimitedDataString(QString, DataExportOptions,
84 sv_frame_t, sv_frame_t) const override { 84 sv_frame_t, sv_frame_t) const override {
85 return ""; 85 return "";
86 } 86 }
150 int m_windowIncrement; 150 int m_windowIncrement;
151 int m_fftSize; 151 int m_fftSize;
152 Window<float> m_windower; 152 Window<float> m_windower;
153 mutable breakfastquay::FFT m_fft; 153 mutable breakfastquay::FFT m_fft;
154 double m_maximumFrequency; 154 double m_maximumFrequency;
155 mutable QString m_error;
155 156
156 int getPeakPickWindowSize(PeakPickType type, sv_samplerate_t sampleRate, 157 int getPeakPickWindowSize(PeakPickType type, sv_samplerate_t sampleRate,
157 int bin, double &dist) const; 158 int bin, double &dist) const;
158 159
159 std::pair<sv_frame_t, sv_frame_t> getSourceSampleRange(int column) const { 160 std::pair<sv_frame_t, sv_frame_t> getSourceSampleRange(int column) const {