comparison data/model/WritableWaveFileModel.h @ 179:0ed2b2e26b44

* Tidy up inheritance hierarchy of model classes -- remove ZoomConstraint as a base class (make it a member instead) and remove virtual inheritances of QObject (no longer necessary).
author Chris Cannam
date Thu, 05 Oct 2006 11:03:06 +0000
parents b0f4555b625e
children f86b74d1b143
comparison
equal deleted inserted replaced
178:0e266fa2510f 179:0ed2b2e26b44
19 #include "WaveFileModel.h" 19 #include "WaveFileModel.h"
20 20
21 class WavFileWriter; 21 class WavFileWriter;
22 class WavFileReader; 22 class WavFileReader;
23 23
24 class WritableWaveFileModel : public RangeSummarisableTimeValueModel, 24 class WritableWaveFileModel : public RangeSummarisableTimeValueModel
25 virtual public PowerOfSqrtTwoZoomConstraint
26 { 25 {
27 Q_OBJECT 26 Q_OBJECT
28 27
29 public: 28 public:
30 WritableWaveFileModel(size_t sampleRate, size_t channels, QString path = ""); 29 WritableWaveFileModel(size_t sampleRate, size_t channels, QString path = "");
33 virtual bool addSamples(float **samples, size_t count); 32 virtual bool addSamples(float **samples, size_t count);
34 virtual void sync(); 33 virtual void sync();
35 34
36 bool isOK() const; 35 bool isOK() const;
37 bool isReady(int *) const; 36 bool isReady(int *) const;
37
38 const ZoomConstraint *getZoomConstraint() const {
39 static PowerOfSqrtTwoZoomConstraint zc;
40 return &zc;
41 }
38 42
39 size_t getFrameCount() const; 43 size_t getFrameCount() const;
40 size_t getChannelCount() const { return m_channels; } 44 size_t getChannelCount() const { return m_channels; }
41 size_t getSampleRate() const { return m_sampleRate; } 45 size_t getSampleRate() const { return m_sampleRate; }
42 46