comparison data/model/ReadOnlyWaveFileModel.h @ 1580:c01cbe41aeb5 fix-static-analysis

Use override throughout
author Chris Cannam
date Mon, 26 Nov 2018 13:48:45 +0000
parents d93e34684da7
children 82d03c9661f9
comparison
equal deleted inserted replaced
1579:232d6ddf257d 1580:c01cbe41aeb5
50 */ 50 */
51 ReadOnlyWaveFileModel(FileSource source, AudioFileReader *reader); 51 ReadOnlyWaveFileModel(FileSource source, AudioFileReader *reader);
52 52
53 ~ReadOnlyWaveFileModel(); 53 ~ReadOnlyWaveFileModel();
54 54
55 bool isOK() const; 55 bool isOK() const override;
56 bool isReady(int *) const; 56 bool isReady(int *) const override;
57 57
58 const ZoomConstraint *getZoomConstraint() const { return &m_zoomConstraint; } 58 const ZoomConstraint *getZoomConstraint() const override { return &m_zoomConstraint; }
59 59
60 sv_frame_t getFrameCount() const; 60 sv_frame_t getFrameCount() const override;
61 int getChannelCount() const; 61 int getChannelCount() const override;
62 sv_samplerate_t getSampleRate() const; 62 sv_samplerate_t getSampleRate() const override;
63 sv_samplerate_t getNativeRate() const; 63 sv_samplerate_t getNativeRate() const override;
64 64
65 QString getTitle() const; 65 QString getTitle() const override;
66 QString getMaker() const; 66 QString getMaker() const override;
67 QString getLocation() const; 67 QString getLocation() const override;
68 68
69 QString getLocalFilename() const; 69 QString getLocalFilename() const;
70 70
71 float getValueMinimum() const { return -1.0f; } 71 float getValueMinimum() const override { return -1.0f; }
72 float getValueMaximum() const { return 1.0f; } 72 float getValueMaximum() const override { return 1.0f; }
73 73
74 virtual sv_frame_t getStartFrame() const { return m_startFrame; } 74 sv_frame_t getStartFrame() const override { return m_startFrame; }
75 virtual sv_frame_t getEndFrame() const { return m_startFrame + getFrameCount(); } 75 sv_frame_t getEndFrame() const override { return m_startFrame + getFrameCount(); }
76 76
77 void setStartFrame(sv_frame_t startFrame) { m_startFrame = startFrame; } 77 void setStartFrame(sv_frame_t startFrame) override { m_startFrame = startFrame; }
78 78
79 virtual floatvec_t getData(int channel, sv_frame_t start, sv_frame_t count) const; 79 floatvec_t getData(int channel, sv_frame_t start, sv_frame_t count) const override;
80 80
81 virtual std::vector<floatvec_t> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const; 81 std::vector<floatvec_t> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const override;
82 82
83 virtual int getSummaryBlockSize(int desired) const; 83 int getSummaryBlockSize(int desired) const override;
84 84
85 virtual void getSummaries(int channel, sv_frame_t start, sv_frame_t count, 85 void getSummaries(int channel, sv_frame_t start, sv_frame_t count,
86 RangeBlock &ranges, 86 RangeBlock &ranges,
87 int &blockSize) const; 87 int &blockSize) const override;
88 88
89 virtual Range getSummary(int channel, sv_frame_t start, sv_frame_t count) const; 89 Range getSummary(int channel, sv_frame_t start, sv_frame_t count) const override;
90 90
91 QString getTypeName() const { return tr("Wave File"); } 91 QString getTypeName() const override { return tr("Wave File"); }
92 92
93 virtual void toXml(QTextStream &out, 93 void toXml(QTextStream &out,
94 QString indent = "", 94 QString indent = "",
95 QString extraAttributes = "") const; 95 QString extraAttributes = "") const override;
96 96
97 protected slots: 97 protected slots:
98 void fillTimerTimedOut(); 98 void fillTimerTimedOut();
99 void cacheFilled(); 99 void cacheFilled();
100 100
107 RangeCacheFillThread(ReadOnlyWaveFileModel &model) : 107 RangeCacheFillThread(ReadOnlyWaveFileModel &model) :
108 m_model(model), m_fillExtent(0), 108 m_model(model), m_fillExtent(0),
109 m_frameCount(model.getFrameCount()) { } 109 m_frameCount(model.getFrameCount()) { }
110 110
111 sv_frame_t getFillExtent() const { return m_fillExtent; } 111 sv_frame_t getFillExtent() const { return m_fillExtent; }
112 virtual void run(); 112 void run() override;
113 113
114 protected: 114 protected:
115 ReadOnlyWaveFileModel &m_model; 115 ReadOnlyWaveFileModel &m_model;
116 sv_frame_t m_fillExtent; 116 sv_frame_t m_fillExtent;
117 sv_frame_t m_frameCount; 117 sv_frame_t m_frameCount;