NullIO.h

Go to the documentation of this file.
00001 //
00002 //  NullIO.h -- Raw driver IO object and StandardIO
00003 //  See the copyright notice and acknowledgment of authors in the file COPYRIGHT
00004 //
00005 
00006 #ifndef CSL_NULLIO_H
00007 #define CSL_NULLIO_H
00008 
00009 #include "CSL_Core.h"
00010 
00011 #include "ThreadUtilities.h"    // Thread util classes (used only by NullIO)
00012 //#include "ThreadedFrameStream.h"
00013 
00014 namespace csl {
00015 
00021 
00022 class NullIO : public IO, public ThreadPthread {
00023 public:             
00024     NullIO();                       
00025     NullIO(unsigned s_rate, unsigned b_size, 
00026         int in_device = 0, int out_device = 0, 
00027         unsigned in_chans = 0, unsigned out_chans = 2);
00028     virtual ~NullIO();
00029     
00030     virtual void start() throw(CException);         
00031     virtual void stop() throw(CException);          
00032     virtual Buffer & getInput() throw(CException) { return mInputBuffer; };
00033     virtual Buffer & getInput(unsigned numFrames, unsigned numChannels) throw(CException) { return mInputBuffer; };
00034 
00035 protected:
00036     bool mRunning;                              
00037     Thread * mThread;                               
00038     Synch * mSynch;                             
00039     static void * FeederFunction(void * arg);       
00040 //  Buffer mEmptyBuffer;
00041 };
00042 
00043 
00047 
00048 class StdIO : public NullIO {
00049 public:             
00050     StdIO();                        
00051     StdIO(unsigned s_rate, unsigned b_size, 
00052         int in_device = 0, int out_device = 0, 
00053         unsigned in_chans = 0, unsigned out_chans = 2);
00054     virtual ~StdIO();
00055     
00056     void start() throw(CException);         
00057     void stop() throw(CException);          
00058 protected:
00059     static void * FeederFunction(void * arg);       
00060 
00061 };
00062 
00063 }   // end of namespace
00064 
00065 #endif CSL_NULLIO_H
00066 

Generated on Thu Sep 17 23:14:15 2009 for CSL by  doxygen 1.5.8