AudioSource.hxx

Go to the documentation of this file.
00001 #ifndef AudioSource_hxx
00002 #define AudioSource_hxx
00003 
00004 #include "Processing.hxx"
00005 #include "AudioOutPort.hxx"
00006 
00007 namespace CLAM
00008 {
00009         class AudioSource : public Processing
00010         {
00011         private:
00012                 AudioOutPort mOut;
00013                 float* mFloatBuffer;
00014                 double* mDoubleBuffer;
00015                 unsigned mBufferSize;
00016         public:
00017                 AudioSource(const ProcessingConfig & conf=Config())
00018                         : mOut("AudioOut",this)
00019                         , mFloatBuffer(0)
00020                         , mDoubleBuffer(0)
00021                         , mBufferSize(0)
00022                 {
00023                         //After being dropped it is ready to run as it does not need any configuration at all
00024                         SetExecState(Ready);
00025                 }
00026 
00027                 void SetFrameAndHopSize(const int val)
00028                 {
00029                         mOut.SetSize(val);
00030                         mOut.SetHop(val);
00031                 }
00032                 
00033                 void SetExternalBuffer(float* buf, unsigned nframes );
00034                 void SetExternalBuffer(double* buf, unsigned nframes );
00035 
00036                 bool Do();
00037                 
00038                 const char* GetClassName() const { return "AudioSource";}
00039 
00040         };
00041 } //namespace CLAM
00042 
00043 #endif
00044 

Generated on Tue Aug 12 22:33:42 2008 for CLAM by  doxygen 1.5.5