CAIO.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006 #ifndef CSL_CAIO_H
00007 #define CSL_CAIO_H
00008
00009 #include "CSL_Core.h"
00010
00011 #include <AudioUnit/AudioUnit.h>
00012
00013 using namespace std;
00014
00015 namespace csl {
00016
00020
00021 class AUIO : public IO {
00022 public:
00023 AUIO();
00024 AUIO(unsigned s_rate, unsigned b_size, int in_device, int out_device, unsigned in_chans, unsigned out_chans);
00025 ~AUIO();
00026
00027 virtual void open() throw(CException);
00028 virtual void close() throw(CException);
00029 virtual void start() throw(CException);
00030 virtual void stop() throw(CException);
00031
00032 void setAudioUnit(AudioUnit au) { mAudioUnit = au; };
00033 virtual Buffer & getInput() throw(CException);
00034 virtual Buffer & getInput(unsigned numFrames, unsigned numChannels) throw(CException);
00035
00036 protected:
00037 AudioUnit mAudioUnit;
00038 void handleError(OSStatus result) throw(CException);
00039 };
00040
00044
00045 class CAIO : public AUIO {
00046 public:
00047 CAIO();
00048 CAIO(unsigned s_rate, unsigned b_size, int in_device, int out_device, unsigned in_chans, unsigned out_chans);
00049 ~CAIO();
00050
00051 void open() throw(CException);
00052 void close() throw(CException);
00053 void start() throw(CException);
00054 void stop() throw(CException);
00055
00056 protected:
00057 void handleError(OSStatus result) throw(CException);
00058
00059 };
00060
00061 }
00062
00063 #endif