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

Method copyFrom

src/core/AudioChannel.cpp:27–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25}
26
27void AudioChannel::copyFrom(const AudioChannel * sourceChannel)
28{
29 bool isSafe = (sourceChannel && sourceChannel->length() >= length());
30 ASSERT(isSafe);
31 if (!isSafe) return;
32
33 if (sourceChannel->isSilent())
34 {
35 zero();
36 return;
37 }
38 memcpy(mutableData(), sourceChannel->data(), sizeof(float) * length());
39}
40
41void AudioChannel::copyFromRange(const AudioChannel * sourceChannel, int startFrame, int endFrame)
42{

Callers

nothing calls this directly

Calls 3

lengthMethod · 0.45
isSilentMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected