MCPcopy Create free account
hub / github.com/LabSound/LabSound / sumFrom

Method sumFrom

src/core/AudioChannel.cpp:71–87  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71void AudioChannel::sumFrom(const AudioChannel * sourceChannel)
72{
73 bool isSafe = sourceChannel && sourceChannel->length() >= length();
74 ASSERT(isSafe);
75
76 if (!isSafe) return;
77
78 if (sourceChannel->isSilent()) return;
79 if (isSilent())
80 {
81 copyFrom(sourceChannel);
82 }
83 else
84 {
85 VectorMath::vadd(data(), 1, sourceChannel->data(), 1, mutableData(), 1, length());
86 }
87}
88
89float AudioChannel::maxAbsValue() const
90{

Callers

nothing calls this directly

Calls 4

vaddFunction · 0.85
lengthMethod · 0.45
isSilentMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected