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

◆ ensure_and_get_audio_unit()

RootAudioUnit & MayaFlux::Buffers::TokenUnitManager::ensure_and_get_audio_unit ( ProcessingToken  token,
uint32_t  channel 
)

Ensures a root audio unit exists for a specific token and channel.

Parameters
tokenProcessing domain
channelChannel index
Returns
Reference to the root audio unit for that token/channel

Definition at line 112 of file TokenUnitManager.cpp.

113{
114 auto& unit = get_or_create_audio_unit(token);
115 if (channel >= unit.channel_count) {
116 ensure_audio_channels(token, channel + 1);
117 }
118 return unit;
119}
void ensure_audio_channels(ProcessingToken token, uint32_t channel_count)
Ensures an audio unit exists and resizes it to the specified channel count.
RootAudioUnit & get_or_create_audio_unit(ProcessingToken token)
Gets or creates a root audio unit for the specified token.

References ensure_audio_channels(), and get_or_create_audio_unit().

+ Here is the call graph for this function: