Allolib  1.0
C++ Components For Interactive Multimedia
al::SpeakerDistanceGainAdjustment Class Reference

Adjust the gain of speakers based on distance. More...

#include <C:/Users/Andres/source/repos/casm_viewer/external/tinc/external/allolib/include/al/sound/al_SpeakerAdjustment.hpp>

Inheritance diagram for al::SpeakerDistanceGainAdjustment:
al::SpeakerDistanceGainAdjustmentProcessor

Public Member Functions

void configure (Speakers layout, double expon=2.0)
 
void processGains (AudioIOData &io)
 

Public Attributes

std::vector< float > mGains
 
Speakers mLayout
 

Detailed Description

Adjust the gain of speakers based on distance.

The function to determine gains is: std::pow(speaker.radius, expon) / std::pow(min_distance, expon);

where min_distance is the closest speaker distance. This way, the closest loudspeaker reatins 1.0 gain.

Definition at line 20 of file al_SpeakerAdjustment.hpp.


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