00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
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__