Browse Source

AU Wrapper: Ensure that correct input channels are cleared before processing

v6.1.6
reuk 3 years ago
parent
commit
72fa2d98e1
No known key found for this signature in database GPG Key ID: 9ADCD339CFC98A11
1 changed files with 6 additions and 2 deletions
  1. +6
    -2
      modules/juce_audio_processors/format_types/juce_AU_Shared.h

+ 6
- 2
modules/juce_audio_processors/format_types/juce_AU_Shared.h View File

@@ -232,8 +232,12 @@ struct AudioUnitHelpers
private:
void clearChannels (int begin, int end)
{
for (auto i = begin; i < end; ++i)
zeromem (scratch.getWritePointer (i), sizeof (float) * (size_t) scratch.getNumSamples());
if (begin <= end && end <= (int) channels.size())
{
std::for_each (channels.begin() + begin,
channels.begin() + end,
[this] (float* ptr) { zeromem (ptr, sizeof (float) * (size_t) scratch.getNumSamples()); });
}
}
float* uniqueBuffer (int idx, float* buffer) noexcept


Loading…
Cancel
Save