|
MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
|
| bool MayaFlux::Buffers::BufferSupplyMixing::supply_audio_buffer_to | ( | const std::shared_ptr< AudioBuffer > & | buffer, |
| ProcessingToken | token, | ||
| uint32_t | channel, | ||
| double | mix = 1.0, |
||
| bool | force = false |
||
| ) |
Supplies an external audio buffer to a specific token and channel.
| buffer | Buffer to supply |
| token | Processing domain |
| channel | Channel index |
| mix | Mix level (default: 1.0) |
| force | If true, forces supply even if buffer is already registered (default: false) The guard exists to prevent accidental multiple registrations of the same buffer to the same channel, which can cause unintended mixing behavior. Setting force to true allows bypassing this guard when intentional. |
The buffer data is added, mixed, and normalized at the end of the processing chain of the channel's root buffer, but before final processing. This is useful when one AudioBuffer needs to be supplied to multiple channels.
Definition at line 24 of file BufferSupplyMixing.cpp.
References MayaFlux::Journal::BufferManagement, channel, MayaFlux::Journal::Core, MayaFlux::Buffers::TokenUnitManager::get_audio_channel_count(), MayaFlux::Buffers::TokenUnitManager::get_audio_unit_mutable(), MayaFlux::Buffers::RootAudioUnit::get_buffer(), MayaFlux::Buffers::TokenUnitManager::has_audio_unit(), m_unit_manager, MF_ERROR, MF_WARN, and MayaFlux::mix().
Referenced by route_buffer_to_channel().
Here is the call graph for this function:
Here is the caller graph for this function: