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 107 of file TokenUnitManager.cpp.

108{
109 auto& unit = get_or_create_audio_unit(token);
110 if (channel >= unit.channel_count) {
111 ensure_audio_channels(token, channel + 1);
112 }
113 return unit;
114}
uint32_t channel
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 channel, ensure_audio_channels(), and get_or_create_audio_unit().

+ Here is the call graph for this function: