SpatialPanner.h

Go to the documentation of this file.
00001 
00010 #ifndef PANNER_H
00011 #define PANNER_H
00012 
00013 #include "SpeakerLayout.h"
00014 #include "SpatialSource.h"
00015 
00016 #include "CSL_Core.h"
00017 #include "CPoint.h"
00018 
00019 namespace csl {
00020 
00024 
00025 class SpatialPanner : public UnitGenerator, public Observer {
00026 public:
00028     SpatialPanner(SpeakerLayout *layout = SpeakerLayout::defaultSpeakerLayout());
00029     virtual ~Panner();
00030 
00033     void setSpeakerLayout(SpeakerLayout *aLayout);
00034 
00035     unsigned numSources() { return mSources.size(); };  
00036     
00037     virtual void addSource(SpatSource &s); 
00038     virtual void removeSource(SpatSource &s); 
00039 
00040     virtual void update(void *arg); 
00041 
00042 protected:
00043     // SpatialSource... refers to its input UGen, but with the knowledge of its position within a space.
00044     vector<SpatSource *> mSources;      
00045     vector<void *> mCache;      
00046 
00047     SpeakerLayout *mSpeakerLayout; 
00048 
00049     Buffer mTempBuffer;     
00050 
00051     virtual void *cache() = 0;
00052     virtual void speakerLayoutChanged() {}; 
00053 }; 
00054 
00055 }
00056 
00057 #endif

Generated on Fri Apr 6 20:18:14 2007 for CSL by  doxygen 1.4.5-20051010