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

wavefile.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:20:44>
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 WAVEFILE_HH
00022 #define WAVEFILE_HH
00023 
00026 #include <qstring.h>
00027 
00028 #include "common.hh"
00029 
00044 #define MAX_PIXPERSEC 160.0
00045 
00046 class QTime;
00047 
00064 class WaveFile
00065 {
00066 public:
00067 
00078   WaveFile();
00079   virtual ~WaveFile();
00080 
00110   virtual bool open(QString fname, int xres) = 0;
00111 
00126   virtual void close() = 0;
00127 
00140   bool isOpen() const;
00141 
00158   virtual QTime length() const = 0;
00159 
00180   virtual size_t getPlayBufferSize(QTime const start, 
00181                                    QTime const end) const = 0;
00182 
00203   virtual void getPlayBuffer(QTime const start, char *buf, 
00204                              size_t &size) = 0;
00205 
00225   void getDispBuffer(QTime const start, char *buffer) const;
00226 
00248   virtual void waveFormat(WaveFormat &f) const = 0;
00249 
00268   void changeRes(int xres);
00269 
00270 protected:
00280   bool opened;
00281 
00291   double pixpersec;
00292 
00302   size_t wavelength;
00303 
00324   char *wave;
00325 
00339   char *dispbuf;
00340 };
00341 
00342 #endif // WAVEFILE_HH

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