OpenShot Audio Library | OpenShotAudio 0.4.0
|
#include <juce_AudioSampleBuffer.h>
Public Types | |
using | SampleType = Type |
Public Member Functions | |
AudioBuffer () noexcept | |
AudioBuffer (int numChannelsToAllocate, int numSamplesToAllocate) | |
AudioBuffer (Type *const *dataToReferTo, int numChannelsToUse, int numSamples) | |
AudioBuffer (Type *const *dataToReferTo, int numChannelsToUse, int startSample, int numSamples) | |
AudioBuffer (const AudioBuffer &other) | |
AudioBuffer & | operator= (const AudioBuffer &other) |
~AudioBuffer ()=default | |
AudioBuffer (AudioBuffer &&other) noexcept | |
AudioBuffer & | operator= (AudioBuffer &&other) noexcept |
int | getNumChannels () const noexcept |
int | getNumSamples () const noexcept |
const Type * | getReadPointer (int channelNumber) const noexcept |
const Type * | getReadPointer (int channelNumber, int sampleIndex) const noexcept |
Type * | getWritePointer (int channelNumber) noexcept |
Type * | getWritePointer (int channelNumber, int sampleIndex) noexcept |
const Type *const * | getArrayOfReadPointers () const noexcept |
Type *const * | getArrayOfWritePointers () noexcept |
void | setSize (int newNumChannels, int newNumSamples, bool keepExistingContent=false, bool clearExtraSpace=false, bool avoidReallocating=false) |
void | setDataToReferTo (Type *const *dataToReferTo, int newNumChannels, int newStartSample, int newNumSamples) |
void | setDataToReferTo (Type *const *dataToReferTo, int newNumChannels, int newNumSamples) |
template<typename OtherType > | |
void | makeCopyOf (const AudioBuffer< OtherType > &other, bool avoidReallocating=false) |
void | clear () noexcept |
void | clear (int startSample, int numSamples) noexcept |
void | clear (int channel, int startSample, int numSamples) noexcept |
bool | hasBeenCleared () const noexcept |
void | setNotClear () noexcept |
Type | getSample (int channel, int sampleIndex) const noexcept |
void | setSample (int destChannel, int destSample, Type newValue) noexcept |
void | addSample (int destChannel, int destSample, Type valueToAdd) noexcept |
void | applyGain (int channel, int startSample, int numSamples, Type gain) noexcept |
void | applyGain (int startSample, int numSamples, Type gain) noexcept |
void | applyGain (Type gain) noexcept |
void | applyGainRamp (int channel, int startSample, int numSamples, Type startGain, Type endGain) noexcept |
void | applyGainRamp (int startSample, int numSamples, Type startGain, Type endGain) noexcept |
void | addFrom (int destChannel, int destStartSample, const AudioBuffer &source, int sourceChannel, int sourceStartSample, int numSamples, Type gainToApplyToSource=Type(1)) noexcept |
void | addFrom (int destChannel, int destStartSample, const Type *source, int numSamples, Type gainToApplyToSource=Type(1)) noexcept |
void | addFromWithRamp (int destChannel, int destStartSample, const Type *source, int numSamples, Type startGain, Type endGain) noexcept |
void | copyFrom (int destChannel, int destStartSample, const AudioBuffer &source, int sourceChannel, int sourceStartSample, int numSamples) noexcept |
void | copyFrom (int destChannel, int destStartSample, const Type *source, int numSamples) noexcept |
void | copyFrom (int destChannel, int destStartSample, const Type *source, int numSamples, Type gain) noexcept |
void | copyFromWithRamp (int destChannel, int destStartSample, const Type *source, int numSamples, Type startGain, Type endGain) noexcept |
Range< Type > | findMinMax (int channel, int startSample, int numSamples) const noexcept |
Type | getMagnitude (int channel, int startSample, int numSamples) const noexcept |
Type | getMagnitude (int startSample, int numSamples) const noexcept |
Type | getRMSLevel (int channel, int startSample, int numSamples) const noexcept |
void | reverse (int channel, int startSample, int numSamples) const noexcept |
void | reverse (int startSample, int numSamples) const noexcept |
A multi-channel buffer containing floating point audio samples.
Definition at line 33 of file juce_AudioSampleBuffer.h.
using juce::AudioBuffer< Type >::SampleType = Type |
This allows templated code that takes an AudioBuffer to access its sample type.
Definition at line 1183 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Creates an empty buffer with 0 channels and 0 length.
Definition at line 38 of file juce_AudioSampleBuffer.h.
|
inline |
Creates a buffer with a specified number of channels and samples.
The contents of the buffer will initially be undefined, so use clear() to set all the samples to zero.
The buffer will allocate its memory internally, and this will be released when the buffer is deleted. If the memory can't be allocated, this will throw a std::bad_alloc exception.
Definition at line 53 of file juce_AudioSampleBuffer.h.
|
inline |
Creates a buffer using a pre-allocated block of memory.
Note that if the buffer is resized or its number of channels is changed, it will re-allocate memory internally and copy the existing data to this new area, so it will then stop directly addressing this memory.
dataToReferTo | a pre-allocated array containing pointers to the data for each channel that should be used by this buffer. The buffer will only refer to this memory, it won't try to delete it when the buffer is deleted or resized. |
numChannelsToUse | the number of channels to use - this must correspond to the number of elements in the array passed in |
numSamples | the number of samples to use - this must correspond to the size of the arrays passed in |
Definition at line 77 of file juce_AudioSampleBuffer.h.
|
inline |
Creates a buffer using a pre-allocated block of memory.
Note that if the buffer is resized or its number of channels is changed, it will re-allocate memory internally and copy the existing data to this new area, so it will then stop directly addressing this memory.
dataToReferTo | a pre-allocated array containing pointers to the data for each channel that should be used by this buffer. The buffer will only refer to this memory, it won't try to delete it when the buffer is deleted or resized. |
numChannelsToUse | the number of channels to use - this must correspond to the number of elements in the array passed in |
startSample | the offset within the arrays at which the data begins |
numSamples | the number of samples to use - this must correspond to the size of the arrays passed in |
Definition at line 104 of file juce_AudioSampleBuffer.h.
|
inline |
Copies another buffer.
This buffer will make its own copy of the other's data, unless the buffer was created using an external data buffer, in which case both buffers will just point to the same shared block of data.
Definition at line 122 of file juce_AudioSampleBuffer.h.
|
default |
Destructor.
This will free any memory allocated by the buffer.
|
inlinenoexcept |
Move constructor.
Definition at line 180 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Adds samples from another buffer to this one.
The hasBeenCleared method will return false after this call if samples have been added.
destChannel | the channel within this buffer to add the samples to |
destStartSample | the start sample within this buffer's channel |
source | the source buffer to add from |
sourceChannel | the channel within the source buffer to read from |
sourceStartSample | the offset within the source buffer's channel to start reading samples from |
numSamples | the number of samples to process |
gainToApplyToSource | an optional gain to apply to the source samples before they are added to this buffer's samples |
Definition at line 784 of file juce_AudioSampleBuffer.h.
Referenced by juce::AudioBuffer< Type >::addFromWithRamp(), juce::ChannelRemappingAudioSource::getNextAudioBlock(), and juce::MixerAudioSource::getNextAudioBlock().
|
inlinenoexcept |
Adds samples from an array of floats to one of the channels.
The hasBeenCleared method will return false after this call if samples have been added.
destChannel | the channel within this buffer to add the samples to |
destStartSample | the start sample within this buffer's channel |
source | the source data to use |
numSamples | the number of samples to process |
gainToApplyToSource | an optional gain to apply to the source samples before they are added to this buffer's samples |
Definition at line 843 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Adds samples from an array of floats, applying a gain ramp to them.
The hasBeenCleared method will return false after this call if samples have been added.
destChannel | the channel within this buffer to add the samples to |
destStartSample | the start sample within this buffer's channel |
source | the source data to use |
numSamples | the number of samples to process |
startGain | the gain to apply to the first sample (this is multiplied with the source samples before they are added to this buffer) |
endGain | The gain that would apply to the sample after the final sample. The gain that applies to the final sample is (numSamples - 1) / numSamples * (endGain - startGain). This ensures a continuous ramp when supplying the same value in endGain and startGain in subsequent blocks. The gain is linearly interpolated between the first and last samples. |
Definition at line 895 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Adds a value to a sample in the buffer.
The channel and index are not checked - they are expected to be in-range. If not, an assertion will be thrown, but in a release build, you're into 'undefined behaviour' territory.
The hasBeenCleared method will return false after this call.
Definition at line 671 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Applies a gain multiple to a region of one channel.
For speed, this doesn't check whether the channel and sample number are in-range, so be careful!
Definition at line 684 of file juce_AudioSampleBuffer.h.
Referenced by juce::ADSR::applyEnvelopeToBuffer(), juce::AudioBuffer< Type >::applyGain(), juce::AudioBuffer< Type >::applyGain(), and juce::AudioBuffer< Type >::applyGainRamp().
|
inlinenoexcept |
Applies a gain multiple to a region of all the channels.
For speed, this doesn't check whether the sample numbers are in-range, so be careful!
Definition at line 705 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Applies a gain multiple to all the audio data.
Definition at line 712 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Applies a range of gains to a region of a channel.
The gain that is applied to each sample will vary from startGain on the first sample to endGain on the last Sample, so it can be used to do basic fades.
For speed, this doesn't check whether the sample numbers are in-range, so be careful!
Definition at line 726 of file juce_AudioSampleBuffer.h.
Referenced by juce::AudioBuffer< Type >::applyGainRamp(), juce::AudioSourcePlayer::audioDeviceIOCallbackWithContext(), and juce::AudioTransportSource::getNextAudioBlock().
|
inlinenoexcept |
Applies a range of gains to a region of all channels.
The gain that is applied to each sample will vary from startGain on the first sample to endGain on the last Sample, so it can be used to do basic fades.
For speed, this doesn't check whether the sample numbers are in-range, so be careful!
Definition at line 761 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Clears all the samples in all channels and marks the buffer as cleared.
This method will do nothing if the buffer has been marked as cleared (i.e. the hasBeenCleared method returns true.)
Definition at line 556 of file juce_AudioSampleBuffer.h.
Referenced by juce::ADSR::applyEnvelopeToBuffer(), juce::AudioBuffer< Type >::AudioBuffer(), juce::AudioSourceChannelInfo::clearActiveBufferRegion(), juce::ResamplingAudioSource::flushBuffers(), juce::AudioFormatReaderSource::getNextAudioBlock(), juce::AudioTransportSource::getNextAudioBlock(), juce::BufferingAudioSource::getNextAudioBlock(), juce::ChannelRemappingAudioSource::getNextAudioBlock(), juce::AudioBuffer< Type >::makeCopyOf(), juce::AudioBuffer< Type >::operator=(), and juce::BufferingAudioSource::prepareToPlay().
|
inlinenoexcept |
Clears a specified region of just one channel.
For speed, this doesn't check whether the channel and sample number are in-range, so be careful!
This method will do nothing if the buffer has been marked as cleared (i.e. the hasBeenCleared method returns true.)
Definition at line 606 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Clears a specified region of all the channels.
This will mark the buffer as cleared if the entire buffer contents are cleared.
For speed, this doesn't check whether the channel and sample number are in-range, so be careful!
This method will do nothing if the buffer has been marked as cleared (i.e. the hasBeenCleared method returns true.)
Definition at line 583 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Copies samples from another buffer to this one.
destChannel | the channel within this buffer to copy the samples to |
destStartSample | the start sample within this buffer's channel |
source | the source buffer to read from |
sourceChannel | the channel within the source buffer to read from |
sourceStartSample | the offset within the source buffer's channel to start reading samples from |
numSamples | the number of samples to process |
Definition at line 938 of file juce_AudioSampleBuffer.h.
Referenced by juce::AudioBuffer< Type >::copyFromWithRamp(), juce::BufferingAudioSource::getNextAudioBlock(), and juce::ChannelRemappingAudioSource::getNextAudioBlock().
|
inlinenoexcept |
Copies samples from an array of floats into one of the channels.
The hasBeenCleared method will return false after this call if samples have been copied.
destChannel | the channel within this buffer to copy the samples to |
destStartSample | the start sample within this buffer's channel |
source | the source buffer to read from |
numSamples | the number of samples to process |
Definition at line 983 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Copies samples from an array of floats into one of the channels, applying a gain to it.
The hasBeenCleared method will return false after this call if samples have been copied.
destChannel | the channel within this buffer to copy the samples to |
destStartSample | the start sample within this buffer's channel |
source | the source buffer to read from |
numSamples | the number of samples to process |
gain | the gain to apply |
Definition at line 1012 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Copies samples from an array of floats into one of the channels, applying a gain ramp.
The hasBeenCleared method will return false after this call if samples have been copied.
destChannel | the channel within this buffer to copy the samples to |
destStartSample | the start sample within this buffer's channel |
source | the source buffer to read from |
numSamples | the number of samples to process |
startGain | the gain to apply to the first sample (this is multiplied with the source samples before they are copied to this buffer) |
endGain | The gain that would apply to the sample after the final sample. The gain that applies to the final sample is (numSamples - 1) / numSamples * (endGain - startGain). This ensures a continuous ramp when supplying the same value in endGain and startGain in subsequent blocks. The gain is linearly interpolated between the first and last samples. |
Definition at line 1067 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Returns a Range indicating the lowest and highest sample values in a given section.
channel | the channel to read from |
startSample | the start sample within the channel |
numSamples | the number of samples to check |
Definition at line 1105 of file juce_AudioSampleBuffer.h.
Referenced by juce::AudioBuffer< Type >::getMagnitude().
|
inlinenoexcept |
Returns an array of pointers to the channels in the buffer.
Don't modify any of the pointers that are returned, and bear in mind that these will become invalid if the buffer is resized.
Definition at line 327 of file juce_AudioSampleBuffer.h.
Referenced by juce::AudioFormatWriter::writeFromAudioSampleBuffer().
|
inlinenoexcept |
Returns an array of pointers to the channels in the buffer.
Don't modify any of the pointers that are returned, and bear in mind that these will become invalid if the buffer is resized.
This will mark the buffer as not cleared and the hasBeenCleared method will return false after this call. If you retain this write pointer and write some data to the buffer after calling its clear method, subsequent clear calls will do nothing. To avoid this either call this method each time you need to write data, or use the setNotClear method to force the internal cleared flag to false.
Definition at line 342 of file juce_AudioSampleBuffer.h.
Referenced by juce::MemoryAudioSource::MemoryAudioSource(), juce::AudioFormatReader::readMaxLevels(), and juce::SynthesiserVoice::renderNextBlock().
|
inlinenoexcept |
Finds the highest absolute sample value within a region of a channel.
Definition at line 1117 of file juce_AudioSampleBuffer.h.
Referenced by juce::AudioBuffer< Type >::getMagnitude().
|
inlinenoexcept |
Finds the highest absolute sample value within a region on all channels.
Definition at line 1131 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Returns the number of channels of audio data that this buffer contains.
Definition at line 236 of file juce_AudioSampleBuffer.h.
Referenced by juce::ADSR::applyEnvelopeToBuffer(), juce::AudioSourcePlayer::audioDeviceIOCallbackWithContext(), juce::AudioTransportSource::getNextAudioBlock(), juce::BufferingAudioSource::getNextAudioBlock(), juce::ChannelRemappingAudioSource::getNextAudioBlock(), juce::IIRFilterAudioSource::getNextAudioBlock(), juce::MemoryAudioSource::getNextAudioBlock(), juce::MixerAudioSource::getNextAudioBlock(), juce::ResamplingAudioSource::getNextAudioBlock(), juce::ReverbAudioSource::getNextAudioBlock(), juce::ToneGeneratorAudioSource::getNextAudioBlock(), juce::MemoryAudioSource::MemoryAudioSource(), juce::AudioFormatReader::read(), juce::SamplerVoice::renderNextBlock(), juce::SynthesiserVoice::renderNextBlock(), juce::AudioFormatWriter::writeFromAudioReader(), and juce::AudioFormatWriter::writeFromAudioSampleBuffer().
|
inlinenoexcept |
Returns the number of samples allocated in each of the buffer's channels.
Definition at line 242 of file juce_AudioSampleBuffer.h.
Referenced by juce::ADSR::applyEnvelopeToBuffer(), juce::BufferingAudioSource::getNextAudioBlock(), juce::MemoryAudioSource::getNextAudioBlock(), juce::MixerAudioSource::getNextAudioBlock(), juce::ResamplingAudioSource::getNextAudioBlock(), juce::MemoryAudioSource::getTotalLength(), juce::MemoryAudioSource::MemoryAudioSource(), juce::BufferingAudioSource::prepareToPlay(), and juce::AudioFormatWriter::writeFromAudioSampleBuffer().
|
inlinenoexcept |
Returns a pointer to an array of read-only samples in one of the buffer's channels.
For speed, this doesn't check whether the channel number is out of range, so be careful when using it!
If you need to write to the data, do NOT call this method and const_cast the result! Instead, you must call getWritePointer so that the buffer knows you're planning on modifying the data.
Definition at line 253 of file juce_AudioSampleBuffer.h.
Referenced by juce::ResamplingAudioSource::getNextAudioBlock(), and juce::AudioFormatWriter::writeFromAudioSampleBuffer().
|
inlinenoexcept |
Returns a pointer to an array of read-only samples in one of the buffer's channels.
For speed, this doesn't check whether the channel number or index are out of range, so be careful when using it!
If you need to write to the data, do NOT call this method and const_cast the result! Instead, you must call getWritePointer so that the buffer knows you're planning on modifying the data.
Definition at line 268 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Returns the root mean squared level for a region of a channel.
Definition at line 1143 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Returns a sample from the buffer.
The channel and index are not checked - they are expected to be in-range. If not, an assertion will be thrown, but in a release build, you're into 'undefined behaviour' territory.
Definition at line 640 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Returns a writeable pointer to one of the buffer's channels.
For speed, this doesn't check whether the channel number is out of range, so be careful when using it!
Note that if you're not planning on writing to the data, you should always use getReadPointer instead.
This will mark the buffer as not cleared and the hasBeenCleared method will return false after this call. If you retain this write pointer and write some data to the buffer after calling its clear method, subsequent clear calls will do nothing. To avoid this either call this method each time you need to write data, or use the setNotClear method to force the internal cleared flag to false.
Definition at line 291 of file juce_AudioSampleBuffer.h.
Referenced by juce::ADSR::applyEnvelopeToBuffer(), juce::AudioSourcePlayer::audioDeviceIOCallbackWithContext(), juce::IIRFilterAudioSource::getNextAudioBlock(), juce::ResamplingAudioSource::getNextAudioBlock(), juce::ReverbAudioSource::getNextAudioBlock(), juce::dsp::Chorus< SampleType >::process(), juce::dsp::Phaser< SampleType >::process(), juce::AudioFormatReader::read(), juce::SamplerVoice::renderNextBlock(), and juce::AudioFormatWriter::writeFromAudioReader().
|
inlinenoexcept |
Returns a writeable pointer to one of the buffer's channels.
For speed, this doesn't check whether the channel number or index are out of range, so be careful when using it!
Note that if you're not planning on writing to the data, you should use getReadPointer instead.
This will mark the buffer as not cleared and the hasBeenCleared method will return false after this call. If you retain this write pointer and write some data to the buffer after calling its clear method, subsequent clear calls will do nothing. To avoid this either call this method each time you need to write data, or use the setNotClear method to force the internal cleared flag to false.
Definition at line 314 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Returns true if the buffer has been entirely cleared.
Note that this does not actually measure the contents of the buffer - it simply returns a flag that is set when the buffer is cleared, and which is reset whenever functions like getWritePointer are invoked. That means the method is quick, but it may return false negatives when in fact the buffer is still empty.
Definition at line 622 of file juce_AudioSampleBuffer.h.
|
inline |
Resizes this buffer to match the given one, and copies all of its content across.
The source buffer can contain a different floating point type, so this can be used to convert between 32 and 64 bit float buffer types.
The hasBeenCleared method will return false after this call if the other buffer contains data.
Definition at line 525 of file juce_AudioSampleBuffer.h.
Referenced by juce::MemoryAudioSource::MemoryAudioSource(), and juce::SynthesiserVoice::renderNextBlock().
|
inlinenoexcept |
Move assignment.
Definition at line 205 of file juce_AudioSampleBuffer.h.
|
inline |
Copies another buffer onto this one.
This buffer's size will be changed to that of the other buffer.
Definition at line 151 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Reverses a part of a channel.
Definition at line 1164 of file juce_AudioSampleBuffer.h.
Referenced by juce::AudioBuffer< Type >::reverse().
|
inlinenoexcept |
Reverses a part of the buffer.
Definition at line 1175 of file juce_AudioSampleBuffer.h.
|
inline |
Makes this buffer point to a pre-allocated set of channel data arrays.
There's also a constructor that lets you specify arrays like this, but this lets you change the channels dynamically.
Note that if the buffer is resized or its number of channels is changed, it will re-allocate memory internally and copy the existing data to this new area, so it will then stop directly addressing this memory.
The hasBeenCleared method will return false after this call.
dataToReferTo | a pre-allocated array containing pointers to the data for each channel that should be used by this buffer. The buffer will only refer to this memory, it won't try to delete it when the buffer is deleted or resized. |
newNumChannels | the number of channels to use - this must correspond to the number of elements in the array passed in |
newNumSamples | the number of samples to use - this must correspond to the size of the arrays passed in |
Definition at line 509 of file juce_AudioSampleBuffer.h.
|
inline |
Makes this buffer point to a pre-allocated set of channel data arrays.
There's also a constructor that lets you specify arrays like this, but this lets you change the channels dynamically.
Note that if the buffer is resized or its number of channels is changed, it will re-allocate memory internally and copy the existing data to this new area, so it will then stop directly addressing this memory.
The hasBeenCleared method will return false after this call.
dataToReferTo | a pre-allocated array containing pointers to the data for each channel that should be used by this buffer. The buffer will only refer to this memory, it won't try to delete it when the buffer is deleted or resized. |
newNumChannels | the number of channels to use - this must correspond to the number of elements in the array passed in |
newStartSample | the offset within the arrays at which the data begins |
newNumSamples | the number of samples to use - this must correspond to the size of the arrays passed in |
Definition at line 468 of file juce_AudioSampleBuffer.h.
Referenced by juce::MemoryAudioSource::MemoryAudioSource(), and juce::AudioBuffer< Type >::setDataToReferTo().
|
inlinenoexcept |
Forces the internal cleared flag of the buffer to false.
This may be useful in the case where you are holding on to a write pointer and call the clear method before writing some data. You can then use this method to mark the buffer as containing data so that subsequent clear calls will succeed. However a better solution is to call getWritePointer each time you need to write data.
Definition at line 631 of file juce_AudioSampleBuffer.h.
|
inlinenoexcept |
Sets a sample in the buffer.
The channel and index are not checked - they are expected to be in-range. If not, an assertion will be thrown, but in a release build, you're into 'undefined behaviour' territory.
The hasBeenCleared method will return false after this call.
Definition at line 655 of file juce_AudioSampleBuffer.h.
Referenced by juce::ToneGeneratorAudioSource::getNextAudioBlock().
|
inline |
Changes the buffer's size or number of channels.
This can expand or contract the buffer's length, and add or remove channels.
Note that if keepExistingContent and avoidReallocating are both true, then it will only avoid reallocating if neither the channel count or length in samples increase.
If the required memory can't be allocated, this will throw a std::bad_alloc exception.
newNumChannels | the new number of channels. |
newNumSamples | the new number of samples. |
keepExistingContent | if this is true, it will try to preserve as much of the old data as it can in the new buffer. |
clearExtraSpace | if this is true, then any extra channels or space that is allocated will be also be cleared. If false, then this space is left uninitialised. |
avoidReallocating | if this is true, then changing the buffer's size won't reduce the amount of memory that is currently allocated (but it will still increase it if the new size is bigger than the amount it currently has). If this is false, then a new allocation will be done so that the buffer uses takes up the minimum amount of memory that it needs. |
Definition at line 367 of file juce_AudioSampleBuffer.h.
Referenced by juce::AudioSourcePlayer::audioDeviceIOCallbackWithContext(), juce::AudioSourcePlayer::audioDeviceStopped(), juce::ChannelRemappingAudioSource::getNextAudioBlock(), juce::MixerAudioSource::getNextAudioBlock(), juce::ResamplingAudioSource::getNextAudioBlock(), juce::AudioBuffer< Type >::makeCopyOf(), juce::AudioBuffer< Type >::operator=(), juce::BufferingAudioSource::prepareToPlay(), juce::MixerAudioSource::prepareToPlay(), juce::ResamplingAudioSource::prepareToPlay(), juce::BufferingAudioSource::releaseResources(), juce::MixerAudioSource::releaseResources(), and juce::ResamplingAudioSource::releaseResources().