PAIO.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006 #ifndef CSL_PAIO_H
00007 #define CSL_PAIO_H
00008
00009 #include "CSL_Core.h"
00010
00011 #include "portaudio.h"
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