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

◆ update_source_mix()

bool MayaFlux::Buffers::MixProcessor::update_source_mix ( const std::shared_ptr< AudioBuffer > &  buffer,
double  new_mix_level 
)

Updates the mix level of an existing source.

Parameters
bufferSource buffer to update
new_mix_levelNew mix level
Returns
true if source was found and updated

Definition at line 101 of file MixProcessor.cpp.

102{
103 for (auto& source : m_sources) {
104 if (source.matches_buffer(buffer)) {
105 source.mix_level = new_mix_level;
106 return true;
107 }
108 }
109 return false;
110}
std::vector< MixSource > m_sources

References m_sources.