diff --git a/modules/juce_core/containers/juce_AbstractFifo.cpp b/modules/juce_core/containers/juce_AbstractFifo.cpp index fa1bc2e20c..c2be77163b 100644 --- a/modules/juce_core/containers/juce_AbstractFifo.cpp +++ b/modules/juce_core/containers/juce_AbstractFifo.cpp @@ -35,7 +35,7 @@ namespace juce { -AbstractFifo::AbstractFifo (int capacity) noexcept : bufferSize (capacity) +AbstractFifo::AbstractFifo (int backingBufferSize) noexcept : bufferSize (backingBufferSize) { jassert (bufferSize > 0); } diff --git a/modules/juce_core/containers/juce_AbstractFifo.h b/modules/juce_core/containers/juce_AbstractFifo.h index 12f75881cc..54231e01e0 100644 --- a/modules/juce_core/containers/juce_AbstractFifo.h +++ b/modules/juce_core/containers/juce_AbstractFifo.h @@ -85,8 +85,11 @@ class JUCE_API AbstractFifo { public: //============================================================================== - /** Creates a FIFO to manage a buffer with the specified capacity. */ - AbstractFifo (int capacity) noexcept; + /** Creates a FIFO to manage a buffer with the specified size. + + The maximum number of items managed by the FIFO is 1 less than the buffer size. + */ + explicit AbstractFifo (int bufferSize) noexcept; //============================================================================== /** Returns the total size of the buffer being managed. */ @@ -102,6 +105,7 @@ public: void reset() noexcept; /** Changes the buffer's total size. + Note that this isn't thread-safe, so don't call it if there's any danger that it might overlap with a call to any other method in this class! */