comparison data/model/WaveFileModel.h @ 384:6f6ab834449d spectrogram-cache-rejig

* Merge from trunk
author Chris Cannam
date Wed, 27 Feb 2008 11:59:42 +0000
parents 1afaf98dbf11
children
comparison
equal deleted inserted replaced
337:a6fab10ff9e6 384:6f6ab834449d
48 size_t getSampleRate() const; 48 size_t getSampleRate() const;
49 size_t getNativeRate() const; 49 size_t getNativeRate() const;
50 50
51 QString getTitle() const; 51 QString getTitle() const;
52 QString getMaker() const; 52 QString getMaker() const;
53 QString getLocation() const;
53 54
54 virtual Model *clone() const; 55 virtual Model *clone() const;
55 56
56 float getValueMinimum() const { return -1.0f; } 57 float getValueMinimum() const { return -1.0f; }
57 float getValueMaximum() const { return 1.0f; } 58 float getValueMaximum() const { return 1.0f; }
65 float *buffer) const; 66 float *buffer) const;
66 67
67 virtual size_t getData(int channel, size_t start, size_t count, 68 virtual size_t getData(int channel, size_t start, size_t count,
68 double *buffer) const; 69 double *buffer) const;
69 70
71 virtual size_t getData(size_t fromchannel, size_t tochannel,
72 size_t start, size_t count,
73 float **buffers) const;
74
75 virtual size_t getSummaryBlockSize(size_t desired) const;
76
70 virtual void getSummaries(size_t channel, size_t start, size_t count, 77 virtual void getSummaries(size_t channel, size_t start, size_t count,
71 RangeBlock &ranges, 78 RangeBlock &ranges,
72 size_t &blockSize) const; 79 size_t &blockSize) const;
73 80
74 virtual Range getSummary(size_t channel, size_t start, size_t count) const; 81 virtual Range getSummary(size_t channel, size_t start, size_t count) const;
82
83 QString getTypeName() const { return tr("Wave File"); }
75 84
76 virtual void toXml(QTextStream &out, 85 virtual void toXml(QTextStream &out,
77 QString indent = "", 86 QString indent = "",
78 QString extraAttributes = "") const; 87 QString extraAttributes = "") const;
79 88
119 RangeCacheFillThread *m_fillThread; 128 RangeCacheFillThread *m_fillThread;
120 QTimer *m_updateTimer; 129 QTimer *m_updateTimer;
121 size_t m_lastFillExtent; 130 size_t m_lastFillExtent;
122 bool m_exiting; 131 bool m_exiting;
123 static PowerOfSqrtTwoZoomConstraint m_zoomConstraint; 132 static PowerOfSqrtTwoZoomConstraint m_zoomConstraint;
133
134 mutable SampleBlock m_directRead;
135 mutable size_t m_lastDirectReadStart;
136 mutable size_t m_lastDirectReadCount;
137 mutable QMutex m_directReadMutex;
124 }; 138 };
125 139
126 #endif 140 #endif