Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
replace alloca with malloc to fix windows builds
  • Loading branch information
Tetsuo55 committed Jun 22, 2013
1 parent 1bd80d7 commit 02351b7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Externals/soundtouch/FIRFilter.cpp
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion Externals/soundtouch/SoundTouch.cpp
Expand Up @@ -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
Expand Down

0 comments on commit 02351b7

Please sign in to comment.