00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef OGGWAVE_HH
00022 #define OGGWAVE_HH
00023
00026 #include "wavefile.hh"
00027
00040 #define PACKET_LENGTH 1024
00041
00042 class QTime;
00043
00044 class OggVorbis_File;
00045
00058 class OggWave : public WaveFile
00059 {
00060 public:
00071 OggWave();
00072 ~OggWave();
00073
00105 bool open(QString fname, int xres);
00106
00117 void close();
00118
00131 QTime length() const;
00132
00155 size_t getPlayBufferSize(QTime const start, QTime const end) const;
00156
00179 void getPlayBuffer(QTime const start, char *buf, size_t &size);
00180
00201 void waveFormat(WaveFormat &f) const;
00202 private:
00203 void loadWave();
00204 OggVorbis_File *ogg;
00205 long active_stream;
00206 long sampling;
00207 int channels;
00208 };
00209
00210 #endif // OGGWAVE_HH