| 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 | { |
nothing calls this directly
no test coverage detected