MayaFlux 0.2.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 105 of file TokenUnitManager.cpp.

106{
107 auto& unit = get_or_create_audio_unit(token);
108 if (channel >= unit.channel_count) {
109 ensure_audio_channels(token, channel + 1);
110 }
111 return unit;
112}
static MayaFlux::Nodes::ProcessingToken token
Definition Timers.cpp:8
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(), get_or_create_audio_unit(), and token.

+ Here is the call graph for this function: