00001 #ifndef AUDIOIO_H 00002 #define AUDIOIO_H 00003 00004 #include "Portaudio.h" 00005 #include "AudioDrome.h" 00006 00007 class AudioIO : public AudioDrome 00008 { 00009 public: 00010 00012 AudioIO(const float &sr=44100); 00013 00015 AudioIO(const AudioIO& x); 00016 00018 virtual ~AudioIO(); 00019 00021 int getVersion (); 00022 00024 00027 const char* getTextVersion (); 00028 00030 void audioError (); 00031 00033 void abortStream(); 00034 00036 void stopStream (); 00037 00039 void setNumBuffers (const unsigned long &numBuffers); 00040 00042 void setBufferSize (const unsigned long &bufferSize); 00043 00045 void setSamplingRate (const double &samplingRate); 00046 00048 00052 void printHostDevices (); 00053 00054 protected: 00055 PaError _err; 00056 PaStream *_stream; 00057 unsigned long _indexBuf; 00058 unsigned long _numBuffers; 00059 unsigned long _bufferSize; 00060 float (*_buffer)[2]; 00061 int _channel; 00062 // float _left; 00063 // float _rigth; 00064 }; 00065 #endif