Home Information Classes Download Usage Mail List Requirements Links Tutorial
00001 /***************************************************/ 00022 /***************************************************/ 00023 00024 #if !defined(__RTDUPLEX_H) 00025 #define __RTDUPLEX_H 00026 00027 #include "Stk.h" 00028 #include "RtAudio.h" 00029 00030 class RtDuplex : public Stk 00031 { 00032 public: 00034 00045 RtDuplex(int nChannels = 1, MY_FLOAT sampleRate = Stk::sampleRate(), int device = 0, int bufferFrames = RT_BUFFER_SIZE, int nBuffers = 2); 00046 00048 ~RtDuplex(); 00049 00051 00054 void start(void); 00055 00057 00060 void stop(void); 00061 00063 MY_FLOAT lastOut(void) const; 00064 00066 00069 MY_FLOAT tick(const MY_FLOAT sample); 00070 00072 00075 MY_FLOAT *tick(MY_FLOAT *vector, unsigned int vectorSize); 00076 00078 const MY_FLOAT *lastFrame(void) const; 00079 00081 00084 MY_FLOAT *tickFrame(MY_FLOAT *frameVector, unsigned int frames = 1); 00085 00086 protected: 00087 00088 RtAudio *audio_; 00089 MY_FLOAT *data_; 00090 MY_FLOAT *lastOutput_; 00091 int bufferSize_; 00092 bool stopped_; 00093 long counter_; 00094 unsigned int channels_; 00095 00096 }; 00097 00098 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2004 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |