Home   Information   Classes   Download   Usage   Mail List   Requirements   Tutorial


RtWvIn.h

00001 /***************************************************/
00020 /***************************************************/
00021 
00022 #if !defined(__RTWVIN_H)
00023 #define __RTWVIN_H
00024 
00025 #include "Stk.h"
00026 #include "WvIn.h"
00027 #include "RtAudio.h"
00028 
00029 class RtWvIn : protected WvIn
00030 {
00031 public:
00033 
00044   RtWvIn(int nChannels = 1, MY_FLOAT sampleRate = Stk::sampleRate(), int device = 0, int bufferFrames = RT_BUFFER_SIZE, int nBuffers = 2);
00045 
00047   ~RtWvIn();
00048 
00050 
00053   void start(void);
00054 
00056 
00059   void stop(void);
00060 
00062   MY_FLOAT lastOut(void) const;
00063 
00065 
00068   MY_FLOAT tick(void);
00069 
00071 
00074   MY_FLOAT *tick(MY_FLOAT *vector, unsigned int vectorSize);
00075 
00077   const MY_FLOAT *lastFrame(void) const;
00078 
00080 
00083   const MY_FLOAT *tickFrame(void);
00084 
00086 
00089   MY_FLOAT *tickFrame(MY_FLOAT *frameVector, unsigned int frames);
00090 
00091 protected:
00092 
00093         RtAudio *audio;
00094   bool stopped;
00095   int stream;
00096   long counter;
00097 
00098 };
00099 
00100 #endif

The Synthesis ToolKit in C++ (STK)
©1995-2002 Perry R. Cook and Gary P. Scavone. All Rights Reserved.