Class GainCalculatorObjects

Class Documentation

class ear::GainCalculatorObjects

Gain calculator for typeDefinition == “Objects”.

Public Functions

GainCalculatorObjects(const Layout &layout)
template<typename T>
void calculate(const ObjectsTypeMetadata &metadata, std::vector<T> &directGains, std::vector<T> &diffuseGains, const WarningCB &warning_cb = default_warning_cb)

Calculate gains for metadata.

directGains and diffuseGains contains per-loudspeaker gains to render this channel.

To apply these gains:

  • directGains are applied to this channel, and summed with other objects into a n-channel direct bus

  • diffuseGains are applied to this channel, and summed with other objects into a n-channel diffuse bus

  • each channel in the diffuse bus is processed with the corresponding FIR filter given by designDecorrelators()

  • each channel in the direct bus is delayed by decorrelatorCompensationDelay() samples to compensate for the delay through the decorrelation filters

  • the output of the decorrelation filters and delays are mixed together to form the output