00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef QwavWAVEDATAINTERFACE_H
00019 #define QwavWAVEDATAINTERFACE_H
00020
00021
00022
00023
00024
00025 #include <string>
00026
00027
00028
00029
00030
00031 #include "qwavdefines.h"
00032 #include "qwavexceptions.h"
00033 #include "qwavpeakvector.h"
00034 #include "qwavmarkerinterface.h"
00035
00036 using namespace std;
00037
00038 Qwav_BEGIN_NAMESPACE
00039
00040 class QwavPeakInterpolationStragegy;
00041
00042
00043
00044
00045
00072 class QWAV_EXPORTIMPORT QwavWaveDataInterface : public QwavMarkerInterface
00073 {
00074 public:
00078 virtual float sampleRate (void) const = 0;
00079
00083 virtual long nrOfSamples (void) const = 0;
00084
00088 virtual uint nrOfChannels(void) const = 0;
00089
00101 virtual bool readFile (const string& filename)
00102 throw(FileOpenError,FileReadError) = 0;
00103
00109 virtual bool writeFile(const string& filename)
00110 throw(FileOpenError,FileReadError) = 0;
00111
00112
00118 virtual QwavPeakInfo getPeak(QwavPeakInterpolator* s,
00119 int pixel,
00120 int nPixels,
00121 Float zoomFac=1.0,
00122 uint channel=1) const =0;
00123
00137 virtual const Float& operator[] (uint index) const = 0;
00138
00144 virtual bool isOpen() const = 0;
00145
00146 protected:
00150
00151
00152
00153 private:
00154
00155 };
00156
00157 Qwav_END_NAMESPACE
00158
00159
00160 #endif // QwavWAVEDATAINTERFACE_H