MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ apply_gain_per_channel()

MAYAFLUX_API void MayaFlux::apply_gain_per_channel ( std::vector< Kakshya::DataVariant > &  channels,
const std::vector< double > &  gain_factors 
)

Apply different gain to each channel (in-place)

Parameters
channelsVector of channel data (modified in-place)
gain_factorsVector of gain factors (must match channels.size())
Exceptions
std::invalid_argumentif gain_factors.size() != channels.size()

Definition at line 533 of file Yantra.cpp.

534{
535 if (gain_factors.size() != channels.size()) {
536 error<std::invalid_argument>(Journal::Component::API, Journal::Context::API, std::source_location::current(),
537 "Gain factors size must match channels size");
538 }
539 for (size_t i = 0; i < channels.size(); ++i)
540 apply_gain(channels[i], gain_factors[i]);
541}

References MayaFlux::Journal::API, and apply_gain().

+ Here is the call graph for this function: