00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef MARSYAS_COLLECTIONFILESOURCE_H
00020 #define MARSYAS_COLLECTIONFILESOURCE_H
00021
00022 #include "AbsSoundFileSource.h"
00023 #include "SoundFileSource.h"
00024 #include "Collection.h"
00025 #include "DownSampler.h"
00026
00027 namespace Marsyas
00028 {
00040 class CollectionFileSource: public AbsSoundFileSource
00041 {
00042 private:
00043 void addControls();
00044 void myUpdate(MarControlPtr sender);
00045 void getHeader(std::string filename);
00046
00047 mrs_natural nChannels_;
00048 std::string filename_;
00049 mrs_real myIsrate_;
00050 MarSystem* isrc_;
00051 MarSystem* downsampler_;
00052
00053 Collection col_;
00054 bool mngCreated_;
00055 mrs_natural cindex_;
00056 mrs_real repetitions_;
00057 mrs_real duration_;
00058
00059 mrs_natural advance_;
00060
00061 realvec temp_;
00062 realvec tempi_;
00063
00064 public:
00065 CollectionFileSource(std::string name);
00066 CollectionFileSource(const CollectionFileSource& a);
00067
00068 ~CollectionFileSource();
00069 MarSystem* clone() const;
00070
00071 void myProcess(realvec& in,realvec &out);
00072
00073
00074 mrs_bool iHasData_;
00075 mrs_bool iLastTickWithData_;
00076 mrs_bool iNewFile_;
00077 };
00078
00079 }
00080
00081
00082 #endif
00083
00084
00085
00086