Pull out ms buffer onto the heap (was being used after end of block in which it was allocated on the stack)
This commit is contained in:
@@ -86,6 +86,7 @@ RubberBandStretcher::Impl::ChannelData::construct(const std::set<size_t> &sizes,
|
||||
|
||||
accumulator = allocate_and_zero<float>(maxSize);
|
||||
windowAccumulator = allocate_and_zero<float>(maxSize);
|
||||
ms = allocate_and_zero<float>(maxSize);
|
||||
interpolator = allocate_and_zero<float>(maxSize);
|
||||
interpolatorScale = 0;
|
||||
|
||||
@@ -176,8 +177,8 @@ RubberBandStretcher::Impl::ChannelData::setSizes(size_t windowSize,
|
||||
envelope = reallocate_and_zero(envelope, oldReal, realSize);
|
||||
fltbuf = reallocate_and_zero(fltbuf, oldMax, maxSize);
|
||||
dblbuf = reallocate_and_zero(dblbuf, oldMax, maxSize);
|
||||
|
||||
interpolator = reallocate_and_zero<float>(interpolator, oldMax, maxSize);
|
||||
ms = reallocate_and_zero(ms, oldMax, maxSize);
|
||||
interpolator = reallocate_and_zero(interpolator, oldMax, maxSize);
|
||||
|
||||
// But we do want to preserve data in these
|
||||
|
||||
@@ -243,6 +244,8 @@ RubberBandStretcher::Impl::ChannelData::~ChannelData()
|
||||
deallocate(prevError);
|
||||
deallocate(unwrappedPhase);
|
||||
deallocate(envelope);
|
||||
deallocate(interpolator);
|
||||
deallocate(ms);
|
||||
deallocate(accumulator);
|
||||
deallocate(windowAccumulator);
|
||||
deallocate(fltbuf);
|
||||
|
||||
Reference in New Issue
Block a user