csl::SpatialPanner Class Reference

#include <SpatialPanner.h>

Inheritance diagram for csl::SpatialPanner:

csl::UnitGenerator csl::Observer csl::Model csl::AmbisonicPanner csl::BinauralPanner csl::VBAP csl::StereoPanner csl::SurroundPanner

List of all members.

Public Member Functions

 SpatialPanner (SpeakerLayout *layout=SpeakerLayout::defaultSpeakerLayout())
virtual ~SpatialPanner ()
void setSpeakerLayout (SpeakerLayout *aLayout)
unsigned numSources ()
virtual void addSource (SpatialSource &s)
 number of active inputs.
virtual void removeSource (SpatialSource &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
 access the cache
virtual void speakerLayoutChanged ()

Protected Attributes

vector< SpatialSource * > mSources
 Vector of pointers to the loudspeakers.
vector< void * > mCache
 Vector of pointers to the prior I/O data.
Buffer mTempBuffer
 Buffer used to temporarily hold input source data.

Detailed Description

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

Constructor & Destructor Documentation

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

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

References csl::Buffer::allocateBuffers(), csl::CGestalt::blockSize(), mTempBuffer, csl::Buffer::setSize(), and setSpeakerLayout().

SpatialPanner::~SpatialPanner (  )  [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.

References csl::Model::attachObserver(), csl::Model::detachObserver(), mSpeakerLayout, and speakerLayoutChanged().

Referenced by SpatialPanner(), and update().

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

References mSources.

Referenced by csl::Spatializer::numSources().

void SpatialPanner::addSource ( SpatialSource s  )  [virtual]

number of active inputs.

Add a sound souce to the list of inputs to be processed and create a cache object

Reimplemented in csl::AmbisonicPanner.

References cache(), mCache, and mSources.

Referenced by csl::Spatializer::addSource(), main(), and csl::Spatializer::setPanningMode().

void SpatialPanner::removeSource ( SpatialSource s  )  [virtual]

Remove a Sound Source.

Reimplemented in csl::AmbisonicPanner.

References csl::logMsg(), and mSources.

Referenced by csl::Spatializer::removeSource().

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.

References csl::SpeakerLayout::defaultSpeakerLayout(), mSpeakerLayout, setSpeakerLayout(), and speakerLayoutChanged().

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

access the cache

Implemented in csl::AmbisonicPanner, csl::BinauralPanner, and csl::VBAP.

Referenced by addSource().

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

Reimplemented in csl::VBAP.

Referenced by setSpeakerLayout(), and update().

Member Data Documentation

Vector of pointers to the loudspeakers.

SpatialSource... refers to its input UGen, but with the knowledge of its position within a space.

Referenced by addSource(), numSources(), and removeSource().

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

Vector of pointers to the prior I/O data.

Referenced by addSource().

Buffer used to temporarily hold input source data.

Referenced by SpatialPanner(), and ~SpatialPanner().

The documentation for this class was generated from the following files:

Generated on Thu Sep 17 23:14:18 2009 for CSL by  doxygen 1.5.8