From 9da130c45e6d2d415c271e65f1734e578f9ea081 Mon Sep 17 00:00:00 2001 From: hogliux Date: Thu, 21 Apr 2016 09:04:09 +0100 Subject: [PATCH] Update comment on estimatedSamplesPerBlock parameter used in the prepareToPlay method --- .../processors/juce_AudioProcessor.h | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/modules/juce_audio_processors/processors/juce_AudioProcessor.h b/modules/juce_audio_processors/processors/juce_AudioProcessor.h index 8f332fb581..cabb2772b0 100644 --- a/modules/juce_audio_processors/processors/juce_AudioProcessor.h +++ b/modules/juce_audio_processors/processors/juce_AudioProcessor.h @@ -73,15 +73,17 @@ public: or query the busArrangement member variable to find out the number of channels your processBlock callback must process. - The estimatedSamplesPerBlock value is a HINT about the typical number of - samples that will be processed for each callback, but isn't any kind - of guarantee. The actual block sizes that the host uses may be different - each time the callback happens, and may be more or less than this value. + The maximumExpectedSamplesPerBlock value is a strong hint about the maximum + number of samples that will be provided in each block. You may want to use + this value to resize internal buffers. You should program defensively in + case a buggy host exceeds this value. The actual block sizes that the host + uses may be different each time the callback happens: completely variable + block sizes can be expected from some hosts. @see busArrangement, getTotalNumInputChannels, getTotalNumOutputChannels */ virtual void prepareToPlay (double sampleRate, - int estimatedSamplesPerBlock) = 0; + int maximumExpectedSamplesPerBlock) = 0; /** Called after playback has stopped, to let the filter free up any resources it no longer needs.