Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

/root/src/subsynth/syn/Core/SampleBufferRepos.h

Go to the documentation of this file.
00001 #ifndef SAMPLE_BUFFER_REPOS
00002 #define SAMPLE_BUFFER_REPOS
00003 
00004 #include <syn/Util/Singleton.h>
00005 #include <syn/Util/FlyWeightPool.h>
00006 #include <syn/Core/SampleBuffer.h>
00007 
00008 namespace syn
00009 {
00013    class SampleBufferRepos : public syn::Singleton<SampleBufferRepos>
00014    {
00015    public:
00016       SampleBufferRepos()
00017       {
00018          pool.setAutoGrow( true );
00019       }   
00023       inline void take( SampleBuffer1f* &t )
00024       {
00025          pool.take( t );
00026          t->resize( this->bufsize() );
00027       }
00028    
00032       inline void putback( SampleBuffer1f* t )
00033       {
00034          pool.putback( t );
00035       }      
00036 
00038       unsigned int bufsize()
00039       {
00040          return 1024;
00041       }
00042       
00043    private:
00044       syn::FlyWeightPool<SampleBuffer1f> pool;
00045    };
00046 }
00047 
00048 #endif

Generated at Mon Apr 15 09:26:07 2002 for subsynth by doxygen1.2.8.1 written by Dimitri van Heesch, © 1997-2001