Mercurial > hg > vamp-plugin-tester
diff TestInitialise.cpp @ 28:b1bc4d045a4b vamp-plugin-tester-v1.0
* Solaris build fixes
author | cannam |
---|---|
date | Thu, 24 Sep 2009 14:11:14 +0000 |
parents | 28097c1b3de4 |
children | f930285dfe5a |
line wrap: on
line diff
--- a/TestInitialise.cpp Thu Sep 24 13:34:18 2009 +0000 +++ b/TestInitialise.cpp Thu Sep 24 14:11:14 2009 +0000 @@ -50,6 +50,10 @@ #include <cmath> +#ifndef __GNUC__ +#include <alloca.h> +#endif + Tester::TestRegistrar<TestSampleRates> TestSampleRates::m_registrar("F1 Different sample rates"); @@ -97,7 +101,11 @@ data = createTestAudio(channels, _step, count); for (size_t i = 0; i < count; ++i) { +#ifdef __GNUC__ float *ptr[channels]; +#else + float **ptr = (float **)alloca(channels * sizeof(float)); +#endif size_t idx = i * _step; for (size_t c = 0; c < channels; ++c) ptr[c] = data[c] + idx; RealTime timestamp = RealTime::frame2RealTime(idx, rate);