mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
AU Wrapper: Ensure that correct input channels are cleared before processing
This commit is contained in:
parent
1bf9ebb4b1
commit
72fa2d98e1
1 changed files with 6 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue