PAIO.h

Go to the documentation of this file.
00001 //
00002 //  PAIO.h -- DAC IO using PortAudio
00003 //  See the copyright notice and acknowledgment of authors in the file COPYRIGHT
00004 //
00005 
00006 #ifndef CSL_PAIO_H
00007 #define CSL_PAIO_H
00008 
00009 #include "CSL_Core.h"
00010 
00011 #include "portaudio.h"  // the portaudio header file in /usr/local/include
00012 
00013 using namespace std;
00014 
00015 namespace csl {
00016 
00020 
00021 class PAIO : public IO {
00022 
00023 public:
00024     PAIO(unsigned s_rate = CSL_mFrameRate, unsigned b_size = CSL_mBlockSize, 
00025             int in_device = -1, int out_device = -1, 
00026             unsigned in_chans = 0, unsigned out_chans = 2);
00027     ~PAIO();                    
00028 
00029     void open() throw(CException);          
00030     void start() throw(CException);         
00031     void stop() throw(CException);          
00032     void close() throw(CException);         
00033     void test() throw(CException);          
00034 
00035     PaStream * mStream;                 
00036 
00037 protected:
00038     PaStreamParameters * mInputParameters;  
00039     PaStreamParameters * mOutputParameters;
00040     
00041     PaDeviceIndex mInDev, mOutDev;          
00042     IODeviceVector mDevices;
00044     void handleError(PaError result) throw(CException);
00046     void initialize(unsigned sr, unsigned bs, int is, int os, unsigned ic, unsigned oc);
00047 };
00048 
00049 }
00050 
00051 #endif

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