Audacity 3.2.0
Classes | Functions
EffectStage.h File Reference
#include "AudioGraphSource.h"
#include "EffectInterface.h"
#include "SampleCount.h"
#include <functional>
Include dependency graph for EffectStage.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  EffectStage
 Decorates a source with a non-timewarping effect, which may have latency. More...
 
struct  EffectStage::CreateToken
 

Functions

MIXER_API unsigned MakeChannelMap (const WideSampleSequence &sequence, int channel, ChannelName map[3])
 

Function Documentation

◆ MakeChannelMap()

MIXER_API unsigned MakeChannelMap ( const WideSampleSequence sequence,
int  channel,
ChannelName  map[3] 
)

Definition at line 372 of file EffectStage.cpp.

374{
375 const auto nChannels = sequence.NChannels();
376 assert(channel < static_cast<int>(nChannels)); // precondition
377
378 size_t index = 0;
379 if (nChannels == 1)
380 map[index++] = ChannelNameMono;
381 else {
382 // TODO: more-than-two-channels
383 if (channel < 1)
384 map[index++] = ChannelNameFrontLeft;
385 if (channel != 0)
386 map[index++] = ChannelNameFrontRight;
387 }
388 map[index] = ChannelNameEOL;
389 return index;
390}
@ ChannelNameFrontLeft
@ ChannelNameEOL
@ ChannelNameMono
@ ChannelNameFrontRight
virtual size_t NChannels() const =0
A constant property.

References ChannelNameEOL, ChannelNameFrontLeft, ChannelNameFrontRight, ChannelNameMono, and WideSampleSequence::NChannels().

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

Here is the call graph for this function:
Here is the caller graph for this function: