mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-26 02:14:22 +00:00
This commit is contained in:
parent
f866008bc6
commit
cc0a7a9e3b
2 changed files with 8 additions and 8 deletions
|
|
@ -22948,7 +22948,7 @@ AudioSampleBuffer::AudioSampleBuffer (const int numChannels_,
|
|||
|
||||
allocatedBytes = numChannels * numSamples * sizeof (float) + 32;
|
||||
allocatedData = (float*) juce_malloc (allocatedBytes);
|
||||
channels = (float**) juce_malloc (numChannels_ * sizeof (float*));
|
||||
channels = (float**) juce_malloc ((numChannels_ + 1) * sizeof (float*));
|
||||
|
||||
float* chan = allocatedData;
|
||||
for (int i = 0; i < numChannels_; ++i)
|
||||
|
|
@ -22970,7 +22970,7 @@ AudioSampleBuffer::AudioSampleBuffer (float** dataToReferTo,
|
|||
{
|
||||
jassert (numChannels_ > 0);
|
||||
|
||||
channels = (float**) juce_malloc (numChannels_ * sizeof (float*));
|
||||
channels = (float**) juce_malloc ((numChannels_ + 1) * sizeof (float*));
|
||||
|
||||
for (int i = 0; i < numChannels_; ++i)
|
||||
{
|
||||
|
|
@ -22994,7 +22994,7 @@ void AudioSampleBuffer::setDataToReferTo (float** dataToReferTo,
|
|||
allocatedBytes = 0;
|
||||
|
||||
if (numChannels_ > numChannels)
|
||||
channels = (float**) juce_realloc (channels, numChannels_ * sizeof (float*));
|
||||
channels = (float**) juce_realloc (channels, (numChannels_ + 1) * sizeof (float*));
|
||||
|
||||
numChannels = numChannels_;
|
||||
size = numSamples;
|
||||
|
|
@ -23014,7 +23014,7 @@ AudioSampleBuffer::AudioSampleBuffer (const AudioSampleBuffer& other) throw()
|
|||
: numChannels (other.numChannels),
|
||||
size (other.size)
|
||||
{
|
||||
channels = (float**) juce_malloc (other.numChannels * sizeof (float*));
|
||||
channels = (float**) juce_malloc ((other.numChannels + 1) * sizeof (float*));
|
||||
|
||||
if (other.allocatedData != 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ AudioSampleBuffer::AudioSampleBuffer (const int numChannels_,
|
|||
|
||||
allocatedBytes = numChannels * numSamples * sizeof (float) + 32;
|
||||
allocatedData = (float*) juce_malloc (allocatedBytes);
|
||||
channels = (float**) juce_malloc (numChannels_ * sizeof (float*));
|
||||
channels = (float**) juce_malloc ((numChannels_ + 1) * sizeof (float*));
|
||||
|
||||
float* chan = allocatedData;
|
||||
for (int i = 0; i < numChannels_; ++i)
|
||||
|
|
@ -71,7 +71,7 @@ AudioSampleBuffer::AudioSampleBuffer (float** dataToReferTo,
|
|||
{
|
||||
jassert (numChannels_ > 0);
|
||||
|
||||
channels = (float**) juce_malloc (numChannels_ * sizeof (float*));
|
||||
channels = (float**) juce_malloc ((numChannels_ + 1) * sizeof (float*));
|
||||
|
||||
for (int i = 0; i < numChannels_; ++i)
|
||||
{
|
||||
|
|
@ -95,7 +95,7 @@ void AudioSampleBuffer::setDataToReferTo (float** dataToReferTo,
|
|||
allocatedBytes = 0;
|
||||
|
||||
if (numChannels_ > numChannels)
|
||||
channels = (float**) juce_realloc (channels, numChannels_ * sizeof (float*));
|
||||
channels = (float**) juce_realloc (channels, (numChannels_ + 1) * sizeof (float*));
|
||||
|
||||
numChannels = numChannels_;
|
||||
size = numSamples;
|
||||
|
|
@ -115,7 +115,7 @@ AudioSampleBuffer::AudioSampleBuffer (const AudioSampleBuffer& other) throw()
|
|||
: numChannels (other.numChannels),
|
||||
size (other.size)
|
||||
{
|
||||
channels = (float**) juce_malloc (other.numChannels * sizeof (float*));
|
||||
channels = (float**) juce_malloc ((other.numChannels + 1) * sizeof (float*));
|
||||
|
||||
if (other.allocatedData != 0)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue