Home   Information   Classes   Download   Usage   Mail List   Requirements   Links   FAQ   Tutorial


WaveLoop.h

00001 /***************************************************/
00017 /***************************************************/
00018 
00019 #ifndef STK_WAVELOOP_H
00020 #define STK_WAVELOOP_H
00021 
00022 #include "FileWvIn.h"
00023 
00024 class WaveLoop : public FileWvIn
00025 {
00026 public:
00028   WaveLoop( unsigned long chunkThreshold = 1000000, unsigned long chunkSize = 1024 );
00029 
00031   WaveLoop( std::string fileName, bool raw = false, bool doNormalize = true,
00032             unsigned long chunkThreshold = 1000000, unsigned long chunkSize = 1024 );
00033 
00035   virtual ~WaveLoop();
00036 
00038 
00047   void openFile( std::string fileName, bool raw = false, bool doNormalize = true );
00048 
00050 
00053   void setRate( StkFloat rate );
00054 
00056 
00062   void setFrequency( StkFloat frequency );
00063 
00065   void addTime( StkFloat time );
00066 
00068 
00073   void addPhase( StkFloat angle );
00074 
00076 
00081   void addPhaseOffset( StkFloat angle );
00082 
00083 protected:
00084 
00085   virtual void computeFrame( void );
00086   virtual void sampleRateChanged( StkFloat newRate, StkFloat oldRate );
00087 
00088   StkFrames firstFrame_;
00089   StkFloat phaseOffset_;
00090 
00091 };
00092 
00093 #endif

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