From 02351b77f9ac62d0151e119a268a3c6336a39084 Mon Sep 17 00:00:00 2001 From: Tetsuo55 Date: Sat, 22 Jun 2013 22:44:27 +0200 Subject: [PATCH] replace alloca with malloc to fix windows builds --- Externals/soundtouch/FIRFilter.cpp | 2 +- Externals/soundtouch/SoundTouch.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Externals/soundtouch/FIRFilter.cpp b/Externals/soundtouch/FIRFilter.cpp index d57389108a..ddd2a87dec 100644 --- a/Externals/soundtouch/FIRFilter.cpp +++ b/Externals/soundtouch/FIRFilter.cpp @@ -170,7 +170,7 @@ uint FIRFilter::evaluateFilterMono(SAMPLETYPE *dest, const SAMPLETYPE *src, uint uint FIRFilter::evaluateFilterMulti(SAMPLETYPE *dest, const SAMPLETYPE *src, uint numSamples, uint numChannels) const { uint i, j, end, c; - LONG_SAMPLETYPE *sum=(LONG_SAMPLETYPE*)alloca(numChannels*sizeof(*sum)); + LONG_SAMPLETYPE *sum=(LONG_SAMPLETYPE*)malloc(numChannels*sizeof(*sum)); #ifdef SOUNDTOUCH_FLOAT_SAMPLES // when using floating point samples, use a scaler instead of a divider // because division is much slower operation than multiplying. diff --git a/Externals/soundtouch/SoundTouch.cpp b/Externals/soundtouch/SoundTouch.cpp index 516d6b23d0..4fad740587 100644 --- a/Externals/soundtouch/SoundTouch.cpp +++ b/Externals/soundtouch/SoundTouch.cpp @@ -348,7 +348,7 @@ void SoundTouch::flush() int i; int nUnprocessed; int nOut; - SAMPLETYPE *buff=(SAMPLETYPE*)alloca(64*channels*sizeof(SAMPLETYPE)); + SAMPLETYPE *buff=(SAMPLETYPE*)malloc(64*channels*sizeof(SAMPLETYPE)); // check how many samples still await processing, and scale // that by tempo & rate to get expected output sample count