From 832deb9ad7dcf4f44858233b2a3d4f05a69f4d18 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 13 Aug 2021 13:55:04 +0100 Subject: [PATCH] AudioBuffer: Revert ce20ab8a causing performance issues in some cases --- modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h b/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h index 09207fbb84..d22f4c1c5a 100644 --- a/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h +++ b/modules/juce_audio_basics/buffers/juce_AudioSampleBuffer.h @@ -227,7 +227,7 @@ public: size (other.size), allocatedBytes (other.allocatedBytes), allocatedData (std::move (other.allocatedData)), - isClear (other.isClear.load()) + isClear (other.isClear) { if (numChannels < (int) numElementsInArray (preallocatedChannelSpace)) { @@ -253,7 +253,7 @@ public: size = other.size; allocatedBytes = other.allocatedBytes; allocatedData = std::move (other.allocatedData); - isClear = other.isClear.load(); + isClear = other.isClear; if (numChannels < (int) numElementsInArray (preallocatedChannelSpace)) { @@ -1124,7 +1124,7 @@ private: Type** channels; HeapBlock allocatedData; Type* preallocatedChannelSpace[32]; - std::atomic isClear { false }; + bool isClear = false; void allocateData() {