diff 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
line wrap: on
line diff
--- a/data/model/WaveFileModel.h	Sat Jun 13 08:47:05 2015 +0100
+++ b/data/model/WaveFileModel.h	Mon Jun 15 12:19:47 2015 +0100
@@ -62,12 +62,9 @@
 
     void setStartFrame(sv_frame_t startFrame) { m_startFrame = startFrame; }
 
-    virtual sv_frame_t getData(int channel, sv_frame_t start, sv_frame_t count,
-                               float *buffer) const;
+    virtual std::vector<float> getData(int channel, sv_frame_t start, sv_frame_t count) const;
 
-    virtual sv_frame_t getMultiChannelData(int fromchannel, int tochannel,
-                                           sv_frame_t start, sv_frame_t count,
-                                           float **buffers) const;
+    virtual std::vector<std::vector<float>> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const;
 
     virtual int getSummaryBlockSize(int desired) const;
 
@@ -123,7 +120,7 @@
     bool m_exiting;
     static PowerOfSqrtTwoZoomConstraint m_zoomConstraint;
 
-    mutable SampleBlock m_directRead;
+    mutable std::vector<float> m_directRead;
     mutable sv_frame_t m_lastDirectReadStart;
     mutable sv_frame_t m_lastDirectReadCount;
     mutable QMutex m_directReadMutex;