csl::SpatialPanner Class Reference

#include <SpatialPanner.h>

Inheritance diagram for csl::SpatialPanner:

csl::UnitGenerator csl::Observer List of all members.

Detailed Description

Base class for all panners. Handles source management and holds a speaker layout.
Todo:
Update all Panners so that they rebuild their caches when changing the speaker layout.


Public Member Functions

 SpatialPanner (SpeakerLayout *layout=SpeakerLayout::defaultSpeakerLayout())
 Constructor - Optionally, a SpeakerLayout can be specified, otherwise the default is used.
virtual ~Panner ()
void setSpeakerLayout (SpeakerLayout *aLayout)
unsigned numSources ()
virtual void addSource (SpatSource &s)
 number of active inputs. Add a sound souce to the list of inputs to be processed.
virtual void removeSource (SpatSource &s)
 Remove a Sound Source.
virtual void update (void *arg)
 Called when the speaker layout changes, so panners update their data.

Protected Member Functions

virtual void * cache ()=0
virtual void speakerLayoutChanged ()

Protected Attributes

vector< SpatSource * > mSources
 Vector of pointers to the loudspeakers.
vector< void * > mCache
 Vector of pointers to the loudspeakers. For internal use of the Panner classes.
SpeakerLayoutmSpeakerLayout
 If null, it will use the default layout by calling SpeakerLayout::defaultSpeakerLayout();.
Buffer mTempBuffer
 Buffer used to temporarily hold input source data.


Constructor & Destructor Documentation

SpatialPanner::SpatialPanner SpeakerLayout layout = SpeakerLayout::defaultSpeakerLayout()  ) 
 

Constructor - Optionally, a SpeakerLayout can be specified, otherwise the default is used.

virtual csl::SpatialPanner::~Panner  )  [virtual]
 


Member Function Documentation

void SpatialPanner::setSpeakerLayout SpeakerLayout aLayout  ) 
 

Set the speaker layout to be used by this panner. The panner will request the default layout if not set.

unsigned csl::SpatialPanner::numSources  )  [inline]
 

void SpatialPanner::addSource SpatSource s  )  [virtual]
 

number of active inputs. Add a sound souce to the list of inputs to be processed.

void SpatialPanner::removeSource SpatSource s  )  [virtual]
 

Remove a Sound Source.

void SpatialPanner::update void *  arg  )  [virtual]
 

Called when the speaker layout changes, so panners update their data.

Called when the speaker layout changes, so panners update their data. This method is implemented only by the Panner class, and depending on the message sent, it calls the appropriate method implemented by subclasses. For example, when the speaker layout changes, the method calls "speakerLayoutChanged()", which should be implemented by subclasses interested to react to such change.

Implements csl::Observer.

virtual void* csl::SpatialPanner::cache  )  [protected, pure virtual]
 

virtual void csl::SpatialPanner::speakerLayoutChanged  )  [inline, protected, virtual]
 


Member Data Documentation

vector<SpatSource *> csl::SpatialPanner::mSources [protected]
 

Vector of pointers to the loudspeakers.

vector<void *> csl::SpatialPanner::mCache [protected]
 

Vector of pointers to the loudspeakers. For internal use of the Panner classes.

SpeakerLayout* csl::SpatialPanner::mSpeakerLayout [protected]
 

If null, it will use the default layout by calling SpeakerLayout::defaultSpeakerLayout();.

Buffer csl::SpatialPanner::mTempBuffer [protected]
 

Buffer used to temporarily hold input source data.


The documentation for this class was generated from the following files:
Generated on Fri Apr 6 20:18:22 2007 for CSL by  doxygen 1.4.5-20051010