00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef SFAUDIOWRITER_H
00023 #define SFAUDIOWRITER_H
00024
00025 #include "AbstractAudioWriter.h"
00026
00027 #include "defines.h"
00028 #include "sndfile.h"
00029
00030 #include <QFile>
00031
00032 class QString;
00033
00034 class SFAudioWriter : public AbstractAudioWriter
00035 {
00036
00037 public:
00038 SFAudioWriter();
00039 ~SFAudioWriter();
00040
00041 bool set_format_attribute(const QString& key, const QString& value);
00042 const char* get_extension();
00043
00044 protected:
00045 bool open_private();
00046 nframes_t write_private(void* buffer, nframes_t frameCount);
00047 bool close_private();
00048 int get_sf_format();
00049
00050 int m_fileType;
00051 SNDFILE* m_sf;
00052 SF_INFO m_sfinfo;
00053
00054 private:
00055 QFile m_file;
00056
00057 };
00058
00059 #endif