Home Information Classes Download Usage Mail List Requirements Links FAQ Tutorial
00001 /***************************************************/ 00019 /***************************************************/ 00020 00021 #ifndef STK_RTWVIN_H 00022 #define STK_RTWVIN_H 00023 00024 #include "WvIn.h" 00025 #include "RtAudio.h" 00026 00027 class RtWvIn : public WvIn 00028 { 00029 public: 00031 00042 RtWvIn( unsigned int nChannels = 1, StkFloat sampleRate = Stk::sampleRate(), int device = 0, int bufferFrames = RT_BUFFER_SIZE, int nBuffers = 20 ); 00043 00045 ~RtWvIn(); 00046 00048 00052 void start( void ); 00053 00055 00059 void stop( void ); 00060 00061 // This function is not intended for general use but had to be made 00062 // public for access from the audio callback function. 00063 void fillBuffer( void *buffer, unsigned int nFrames ); 00064 00065 protected: 00066 00067 void computeFrame( void ); 00068 00069 RtAudio adc_; 00070 bool stopped_; 00071 unsigned int readIndex_; 00072 unsigned int writeIndex_; 00073 unsigned int framesFilled_; 00074 00075 }; 00076 00077 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2007 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |