#include <SpatialPanner.h>

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. | |
| SpeakerLayout * | mSpeakerLayout |
| Buffer | mTempBuffer |
| Buffer used to temporarily hold input source data. | |
| 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] |
References csl::Model::detachObserver(), csl::Buffer::freeBuffers(), mSpeakerLayout, and mTempBuffer.
| 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] |
| 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] |
vector<SpatialSource *> csl::SpatialPanner::mSources [protected] |
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] |
SpeakerLayout* csl::SpatialPanner::mSpeakerLayout [protected] |
If null, it will use the default layout by calling SpeakerLayout::defaultSpeakerLayout();
Referenced by setSpeakerLayout(), csl::VBAP::speakerLayoutChanged(), update(), csl::VBAP::VBAP(), ~SpatialPanner(), csl::StereoPanner::~StereoPanner(), and csl::SurroundPanner::~SurroundPanner().
Buffer csl::SpatialPanner::mTempBuffer [protected] |
Buffer used to temporarily hold input source data.
Referenced by SpatialPanner(), and ~SpatialPanner().
1.5.8