comparison data/model/WaveFileModel.h @ 1096:4d9816ba0ebe simple-fft-model

Rework audio file reader API to prefer using std containers
author Chris Cannam
date Mon, 15 Jun 2015 12:19:47 +0100
parents 9f4505ac9072
children efea94b04d5a
comparison
equal deleted inserted replaced
1095:b66734b5f806 1096:4d9816ba0ebe
60 virtual sv_frame_t getStartFrame() const { return m_startFrame; } 60 virtual sv_frame_t getStartFrame() const { return m_startFrame; }
61 virtual sv_frame_t getEndFrame() const { return m_startFrame + getFrameCount(); } 61 virtual sv_frame_t getEndFrame() const { return m_startFrame + getFrameCount(); }
62 62
63 void setStartFrame(sv_frame_t startFrame) { m_startFrame = startFrame; } 63 void setStartFrame(sv_frame_t startFrame) { m_startFrame = startFrame; }
64 64
65 virtual sv_frame_t getData(int channel, sv_frame_t start, sv_frame_t count, 65 virtual std::vector<float> getData(int channel, sv_frame_t start, sv_frame_t count) const;
66 float *buffer) const;
67 66
68 virtual sv_frame_t getMultiChannelData(int fromchannel, int tochannel, 67 virtual std::vector<std::vector<float>> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const;
69 sv_frame_t start, sv_frame_t count,
70 float **buffers) const;
71 68
72 virtual int getSummaryBlockSize(int desired) const; 69 virtual int getSummaryBlockSize(int desired) const;
73 70
74 virtual void getSummaries(int channel, sv_frame_t start, sv_frame_t count, 71 virtual void getSummaries(int channel, sv_frame_t start, sv_frame_t count,
75 RangeBlock &ranges, 72 RangeBlock &ranges,
121 QTimer *m_updateTimer; 118 QTimer *m_updateTimer;
122 sv_frame_t m_lastFillExtent; 119 sv_frame_t m_lastFillExtent;
123 bool m_exiting; 120 bool m_exiting;
124 static PowerOfSqrtTwoZoomConstraint m_zoomConstraint; 121 static PowerOfSqrtTwoZoomConstraint m_zoomConstraint;
125 122
126 mutable SampleBlock m_directRead; 123 mutable std::vector<float> m_directRead;
127 mutable sv_frame_t m_lastDirectReadStart; 124 mutable sv_frame_t m_lastDirectReadStart;
128 mutable sv_frame_t m_lastDirectReadCount; 125 mutable sv_frame_t m_lastDirectReadCount;
129 mutable QMutex m_directReadMutex; 126 mutable QMutex m_directReadMutex;
130 }; 127 };
131 128