Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


WvOut.h

00001 /***************************************************/
00021 /***************************************************/
00022 
00023 #ifndef STK_WVOUT_H
00024 #define STK_WVOUT_H
00025 
00026 #include "Stk.h"
00027 #include <vector>
00028 
00029 class WvOut : public Stk
00030 {
00031  public:
00032 
00034   WvOut();
00035 
00037   virtual ~WvOut();
00038 
00040   unsigned long getFrameCount( void ) const;
00041 
00043   StkFloat getTime( void ) const;
00044 
00046   bool clipStatus( void ) { return clipping_; };
00047 
00049   void resetClipStatus( void ) { clipping_ = false; };
00050 
00052 
00055   void tick( const StkFloat sample );
00056 
00058 
00064   void tick( const StkFrames& frames, unsigned int channel = 0 );
00065 
00067 
00072   void tickFrame( const StkFrames& frames );
00073 
00074  protected:
00075 
00076   // These abstract functions must be implemented in all subclasses.
00077   // They are used to get around a C++ problem with overloaded virtual
00078   // functions.
00079   virtual void computeSample( const StkFloat sample ) = 0;
00080 
00081   virtual void computeFrames( const StkFrames& frames ) = 0;
00082 
00083   // Check for sample clipping and clamp.
00084   StkFloat& clipTest( StkFloat& sample );
00085 
00086   StkFrames data_;
00087   unsigned long frameCounter_;
00088   bool clipping_;
00089 
00090 };
00091 
00092 #endif

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