00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MARSYAS_SOUNDFILESINK_H
00020 #define MARSYAS_SOUNDFILESINK_H
00021
00022 #include "realvec.h"
00023 #include "AuFileSink.h"
00024 #include "WavFileSink.h"
00025 #include "MP3FileSink.h"
00026
00027 namespace Marsyas
00028 {
00044 class SoundFileSink: public MarSystem
00045 {
00046 private:
00047 virtual void addControls();
00048 virtual void myUpdate(MarControlPtr sender);
00049
00050 protected:
00051 short *sdata_;
00052 unsigned char *cdata_;
00053 long *ldata_;
00054
00055
00056 std::string filename_;
00057
00058 FILE *sfp_;
00059 long sfp_begin_;
00060
00061 AbsSoundFileSink* dest_;
00062
00063 public:
00064 SoundFileSink(std::string name);
00065 SoundFileSink(const SoundFileSink& a);
00066 ~SoundFileSink();
00067 MarSystem* clone() const;
00068 bool checkType();
00069
00070 virtual void myProcess(realvec& in, realvec& out);
00071
00072 virtual void putHeader();
00073
00074
00075
00076 void putFloat(mrs_natural c, realvec& win);
00077
00078 };
00079
00080 }
00081
00082 #endif
00083
00084