Főoldal | Osztályhierarchia | Osztálylista | Fájllista | Osztálytagok | Fájlelemek | Kapcsolódó lapok

oggwave.hh

Ugrás a fájl dokumentációjához.
00001 /*
00002  * SubTimer header file
00003  *  Copyright (C) 2005 Peter Salvi
00004  *   Last modification: <2005.03.23., 16:16:26>
00005  *
00006  *  This program is free software; you can redistribute it and/or modify
00007  *  it under the terms of the GNU General Public License as published by
00008  *  the Free Software Foundation; either version 2 of the License, or
00009  *  (at your option) any later version.
00010  *
00011  *  This program is distributed in the hope that it will be useful,
00012  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  *  GNU General Public License for more details.
00015  *
00016  *  You should have received a copy of the GNU General Public License
00017  *  along with this program; if not, write to the Free Software
00018  *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
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

Projekt: SubTimer Készült: Wed Mar 23 22:06:53 2005 Készítette: doxygen 1.3.6