Home Information Classes Download Usage Mail List Requirements Links Tutorial
00001 /***************************************************/ 00019 /***************************************************/ 00020 00021 #ifndef STK_RTWVOUT_H 00022 #define STK_RTWVOUT_H 00023 00024 #include "WvOut.h" 00025 #include "RtAudio.h" 00026 00027 class RtWvOut : public WvOut 00028 { 00029 public: 00030 00032 00043 RtWvOut( unsigned int nChannels = 1, StkFloat sampleRate = Stk::sampleRate(), 00044 int device = 0, int bufferFrames = RT_BUFFER_SIZE, int nBuffers = 4 ); 00045 00047 ~RtWvOut(); 00048 00050 00054 void start(void); 00055 00057 00061 void stop(void); 00062 00063 protected: 00064 00065 void computeSample( const StkFloat sample ); 00066 00067 void computeFrames( const StkFrames& frames ); 00068 00069 void incrementFrame( void ); 00070 00071 RtAudio *dac_; 00072 StkFloat *buffer_; 00073 bool stopped_; 00074 unsigned int nChannels_; 00075 unsigned int bufferIndex_; 00076 unsigned int iBuffer_; 00077 unsigned int bufferFrames_; 00078 00079 }; 00080 00081 #endif
The Synthesis ToolKit in C++ (STK) |
©1995-2005 Perry R. Cook and Gary P. Scavone. All Rights Reserved. |