soundfile.h

00001 /***************************************************************************
00002  *
00003  *   ::::_audioeditor_::::
00004  *   a simple multitrack audio editor
00005  *
00006  *   soundfile
00007  *   header file
00008  *
00009  *   begin                : Jan 2006
00010  *   copyright            : (C) 2006 by Georg Holzmann
00011  *   email                : grh@mur.at
00012  *
00013  *   This program is free software; you can redistribute it and/or modify
00014  *   it under the terms of the GNU General Public License as published by
00015  *   the Free Software Foundation; either version 2 of the License, or
00016  *   (at your option) any later version.
00017  *
00018  ***************************************************************************/
00019 
00020 #ifndef SOUNDFILE_H__
00021 #define SOUNDFILE_H__
00022 
00023 #include <QObject>
00024 #include "sndfile.h"
00025 #include "globaldefines.h"
00026 #include <QReadWriteLock>
00027 
00028 class AudioCtl;
00029 
00036 class Soundfile : public QObject
00037 {
00038   Q_OBJECT
00039   
00040   public:
00041     Soundfile();
00042     virtual ~Soundfile();
00043     
00049     bool open(const QString &fileName);
00050     
00052     void close();
00053     
00067     int process(unsigned long size, float *output);
00068     
00069   public slots:
00070     
00075     void seek(Position new_pos);
00076     
00077   protected:
00078     
00080     SNDFILE* m_sndfile;
00081     QReadWriteLock m_sndfile_lock;
00082     
00084     SF_INFO m_info;
00085     QReadWriteLock m_info_lock;
00086     
00088     AudioCtl *m_audioctl;
00089 };
00090 
00091 #endif // SOUNDFILE_H__

Generated on Fri Jul 6 12:38:40 2007 for audioeditor.kdevelop by  doxygen 1.5.2