Allolib
1.0
C++ Components For Interactive Multimedia
|
#include <C:/Users/Andres/source/repos/casm_viewer/external/tinc/external/allolib/include/al/sound/al_Vbap.hpp>
Public Types | |
enum | VbapOptions { KEEP_SAME_ELEVATION } |
Public Member Functions | |
Vbap (const Speakers &sl, bool is3D=false) | |
void | setOptions (VbapOptions options) |
virtual void | compile () override |
void | makePhantomChannel (int channelIndex, std::vector< unsigned int > assignedOutputs) |
Make an existing channel a phantom channel. More... | |
void | set3D (bool is3D) |
virtual void | renderSample (AudioIOData &io, const Pose &reldir, const float &sample, const unsigned int &frameIndex) override |
Render audio sample in position. | |
virtual void | renderBuffer (AudioIOData &io, const Pose &reldir, const float *samples, const unsigned int &numFrames) override |
Render audio buffer in position. | |
virtual void | print (std::ostream &stream=std::cout) override |
Print out information about spatializer. | |
void | makeTriple (int s1, int s2, int s3=-1) |
Manually add a triple from indeces to speakers. | |
std::vector< SpeakerTriple > | triplets () const |
virtual void | prepare (AudioIOData &io) |
virtual void | finalize (AudioIOData &io) |
int | numSpeakers () const |
Get number of speakers. | |
virtual void | numFrames (unsigned int v) |
Set number of frames. | |
Protected Attributes | |
Speakers | mSpeakers |
std::vector< float > | mBuffer |
unsigned int | mNumFrames {0} |
Vector-based amplitude panner
Definition at line 87 of file al_Vbap.hpp.
al::Vbap::Vbap | ( | const Speakers & | sl, |
bool | is3D = false |
||
) |
[in] | sl | A speaker layout |
|
overridevirtual |
Perform any necessary updates when the speaker layout changes, ex. new speaker triplets for VBAP Must be called before any calls to prepare(), renderBuffer(), renderSample() or perform()
Reimplemented from al::Spatializer.
|
inlinevirtualinherited |
Called once per listener, after sources are rendered. ex. ambisonics decode
Reimplemented in al::AmbisonicsSpatializer.
Definition at line 84 of file al_Spatializer.hpp.
void al::Vbap::makePhantomChannel | ( | int | channelIndex, |
std::vector< unsigned int > | assignedOutputs | ||
) |
Make an existing channel a phantom channel.
channelIndex | the channel index of the phantom channel |
assignedOutputs | the list of channel indeces for signal reassignment |
Signals that should go out to phantom channels will be distributed among the channels listed in the assignedOutputs vector. This can be useful to force triangulation in unusual situations (e.g. three rings on a sphere...) but it can also be used creatively to make an area in space be reassigned somewhere else, or to a wider number of speakers.
|
inlinevirtualinherited |
Called once per listener, before sources are rendered. ex. zero ambisonics coefficients
Reimplemented in al::Lbap, and al::AmbisonicsSpatializer.
Definition at line 70 of file al_Spatializer.hpp.
|
inline |
Set whether VBAP will use 3D (triangles) or 2D (speaker pairs) You must call compile after this function to ensure triples are recomputed
Definition at line 118 of file al_Vbap.hpp.