|
|
|
@@ -59,6 +59,10 @@ public: |
|
|
|
|
|
|
|
/** 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.
|
|
|
|
|
|
|
|
@param 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
|
|
|
|
@@ -137,6 +141,29 @@ public: |
|
|
|
const bool clearExtraSpace = false,
|
|
|
|
const bool avoidReallocating = false) throw();
|
|
|
|
|
|
|
|
|
|
|
|
/** 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.
|
|
|
|
|
|
|
|
@param 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.
|
|
|
|
@param numChannels the number of channels to use - this must correspond to the
|
|
|
|
number of elements in the array passed in
|
|
|
|
@param numSamples the number of samples to use - this must correspond to the
|
|
|
|
size of the arrays passed in
|
|
|
|
*/
|
|
|
|
void setDataToReferTo (float** dataToReferTo,
|
|
|
|
const int numChannels,
|
|
|
|
const int numSamples) throw();
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
|
/** Clears all the samples in all channels. */
|
|
|
|
void clear() throw();
|
|
|
|
|