MCPcopy Create free account
hub / github.com/audacity/audacity / MakeChannelMap

Function MakeChannelMap

libraries/lib-mixer/EffectStage.cpp:370–386  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370unsigned MakeChannelMap(int nChannels, int channel, ChannelName map[3])
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}

Callers 2

ProcessPassMethod · 0.85
MakeInstancesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected