00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include "config.h"
00024
00025
00026
00027 #ifndef MARSYAS_GSTREAMERSOURCE_H
00028 #define MARSYAS_GSTREAMERSOURCE_H
00029
00030 #include "AbsSoundFileSource.h"
00031 #include <sys/stat.h>
00032
00033 namespace Marsyas
00034 {
00045 class GStreamerSource : public AbsSoundFileSource
00046 {
00047 private:
00048
00049 mrs_real time_;
00050 mrs_real rate_;
00051
00052
00053
00054
00055 mrs_real *data_;
00056 mrs_real phaseOffset_;
00057
00058 mrs_natural fileSize_;
00059 bool byteSwap_;
00060 std::string filename_;
00061 mrs_natural ch_, pos_, nChannels_, sampleCount_;
00062
00063 void addControls();
00064 void myUpdate(MarControlPtr sender);
00065
00066 void getHeader(std::string filename);
00067
00068 public:
00069 GStreamerSource(std::string name);
00070 ~GStreamerSource();
00071
00072 MarSystem* clone() const;
00073 void myProcess(realvec& in,realvec &out);
00074
00075 };
00076
00077 }
00078
00079 #endif // !MARSYAS_GSTREAMERSOURCE_H
00080
00081
00082