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

Method appendDebugBuffer

src/core/AudioContext.cpp:84–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 int debugBufferIndex = 0;
83
84 void appendDebugBuffer(AudioBus* bus, int channel, int count)
85 {
86 if (!bus || bus->numberOfChannels() < channel || !count)
87 return;
88
89 if (!debugBuffer.size())
90 {
91 debugBuffer.resize(debugBufferCapacity);
92 memset(debugBuffer.data(), 0, debugBufferCapacity);
93 }
94
95 if (debugBufferIndex + count > debugBufferCapacity)
96 debugBufferIndex = 0;
97
98 memcpy(debugBuffer.data() + debugBufferIndex, bus->channel(channel)->data(), sizeof(float) * count);
99 debugBufferIndex += count;
100 }
101
102 void flushDebugBuffer(char const* const wavFilePath)
103 {

Callers

nothing calls this directly

Calls 5

sizeMethod · 0.80
resizeMethod · 0.80
channelMethod · 0.80
numberOfChannelsMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected