00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "MarFileSink.h"
00020
00021
00022 using std::ostringstream;
00023 using std::cout;
00024 using std::endl;
00025
00026 using namespace Marsyas;
00027
00028 MarFileSink::MarFileSink(mrs_string name):MarSystem("MarFileSink",name)
00029 {
00030
00031
00032 }
00033
00034 MarFileSink::~MarFileSink()
00035 {
00036 }
00037
00038
00039 MarSystem*
00040 MarFileSink::clone() const
00041 {
00042 return new MarFileSink(*this);
00043 }
00044
00045 void
00046 MarFileSink::myProcess(realvec& in, realvec& out)
00047 {
00048 mrs_natural t,o;
00049 mrs_natural nObservations = getctrl("mrs_natural/inObservations")->to<mrs_natural>();
00050 mrs_natural nSamples = getctrl("mrs_natural/inSamples")->to<mrs_natural>();
00051
00052 checkFlow(in, out);
00053
00054 for (o=0; o < nObservations; o++)
00055 for (t = 0; t < nSamples; t++)
00056 {
00057 out(o,t) = in(o,t);
00058 cout << out(o,t) << " ";
00059 }
00060 cout << endl;
00061 }
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080