Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


Generator.h

00001 /***************************************************/
00010 /***************************************************/
00011 
00012 #ifndef STK_GENERATOR_H
00013 #define STK_GENERATOR_H
00014 
00015 #include "Stk.h"
00016 
00017 class Generator : public Stk
00018 {
00019  public:
00021   Generator( void );
00022 
00024   virtual ~Generator( void );
00025 
00027   virtual StkFloat lastOut( void ) const { return lastOutput_; };
00028 
00030   StkFloat tick( void );
00031 
00033 
00039   StkFrames& tick( StkFrames& frames, unsigned int channel = 0 );
00040 
00041  protected:
00042 
00043   // This abstract function must be implemented in all subclasses.
00044   // It is used to get around a C++ problem with overloaded virtual
00045   // functions.
00046   virtual StkFloat computeSample( void ) = 0;
00047 
00048   StkFloat lastOutput_;
00049 
00050 };
00051 
00052 #endif
00053 

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