Audacity 3.2.0
Namespaces | Functions
EffectStage.cpp File Reference
#include "EffectStage.h"
#include "AudacityException.h"
#include "AudioGraphBuffers.h"
#include <cassert>
Include dependency graph for EffectStage.cpp:

Go to the source code of this file.

Namespaces

namespace  anonymous_namespace{EffectStage.cpp}
 

Functions

std::vector< std::shared_ptr< EffectInstance > > anonymous_namespace{EffectStage.cpp}::MakeInstances (const EffectStage::Factory &factory, EffectSettings &settings, double sampleRate, std::optional< sampleCount > genLength, int channel, int nInputChannels)
 
unsigned MakeChannelMap (int nChannels, int channel, ChannelName map[3])
 

Function Documentation

◆ MakeChannelMap()

unsigned MakeChannelMap ( int  nChannels,
int  channel,
ChannelName  map[3] 
)

Definition at line 370 of file EffectStage.cpp.

371{
372 assert(channel < static_cast<int>(nChannels)); // precondition
373
374 size_t index = 0;
375 if (nChannels == 1)
376 map[index++] = ChannelNameMono;
377 else {
378 // TODO: more-than-two-channels
379 if (channel < 1)
380 map[index++] = ChannelNameFrontLeft;
381 if (channel != 0)
382 map[index++] = ChannelNameFrontRight;
383 }
384 map[index] = ChannelNameEOL;
385 return index;
386}
@ ChannelNameFrontLeft
@ ChannelNameEOL
@ ChannelNameMono
@ ChannelNameFrontRight

References ChannelNameEOL, ChannelNameFrontLeft, ChannelNameFrontRight, and ChannelNameMono.

Referenced by anonymous_namespace{EffectStage.cpp}::MakeInstances(), and PerTrackEffect::ProcessPass().

Here is the caller graph for this function: