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

Method ProcessSampleFromChannel

libraries/lib-math/EBUR128.cpp:83–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

81}
82
83void EBUR128::ProcessSampleFromChannel(float x_in, size_t channel) const
84{
85 double value;
86 value = mWeightingFilter[channel][0].ProcessOne(x_in);
87 value = mWeightingFilter[channel][1].ProcessOne(value);
88 if(channel == 0)
89 mBlockRingBuffer[mBlockRingPos] = value * value;
90 else
91 {
92 // Add the power of additional channels to the power of first channel.
93 // As a result, stereo tracks appear about 3 LUFS louder, as specified.
94 mBlockRingBuffer[mBlockRingPos] += value * value;
95 }
96}
97
98void EBUR128::NextSample()
99{

Callers 1

AnalyseBufferBlockMethod · 0.80

Calls 1

ProcessOneMethod · 0.45

Tested by

no test coverage detected