00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "AbsSoundFileSource2.h"
00020
00021 using std::ostringstream;
00022 using namespace Marsyas;
00023
00024 AbsSoundFileSource2::AbsSoundFileSource2(mrs_string type, mrs_string name):MarSystem(type, name)
00025 {
00026 filename_ = "defaultfile";
00027 size_ = 0;
00028
00029 addControls();
00030 }
00031
00032 AbsSoundFileSource2::~AbsSoundFileSource2()
00033 {
00034 }
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051 MarSystem*
00052 AbsSoundFileSource2::clone() const
00053 {
00054 return new AbsSoundFileSource2(*this);
00055 }
00056
00057 void
00058 AbsSoundFileSource2::addControls()
00059 {
00060
00061 setctrl("mrs_string/inObsNames", "audio,");
00062
00063
00064 addctrl("mrs_natural/nChannels",(mrs_natural)1);
00065
00066
00067 addctrl("mrs_natural/pos", (mrs_natural)0);
00068
00069 addctrl("mrs_bool/hasData", false);
00070
00071 addctrl("mrs_string/filename", "defaultfile");
00072 setctrlState("mrs_string/filename", true);
00073
00074 addctrl("mrs_string/filetype", "defaulttype");
00075
00076 addctrl("mrs_natural/size", (mrs_natural)0);
00077 }
00078
00079 bool
00080 AbsSoundFileSource2::getHeader()
00081 {
00082
00083 return true;
00084 }
00085
00086 realvec&
00087 AbsSoundFileSource2::getAudioRegion(mrs_natural startSample, mrs_natural endSample)
00088 {
00089 (void) startSample; (void) endSample;
00090
00091 return audioRegion_;
00092 }
00093
00094 void
00095 AbsSoundFileSource2::myProcess(realvec& in,realvec &out)
00096 {
00097 (void) in;
00098
00099 out.setval(0.0);
00100 }