Mercurial > hg > vamp-plugin-tester
diff TestOutputs.cpp @ 28:b1bc4d045a4b vamp-plugin-tester-v1.0
* Solaris build fixes
author | cannam |
---|---|
date | Thu, 24 Sep 2009 14:11:14 +0000 |
parents | 7dd6a549b2f9 |
children | ed9d3c27f687 |
line wrap: on
line diff
--- a/TestOutputs.cpp Thu Sep 24 13:34:18 2009 +0000 +++ b/TestOutputs.cpp Thu Sep 24 14:11:14 2009 +0000 @@ -50,6 +50,10 @@ #include <cmath> +#ifndef __GNUC__ +#include <alloca.h> +#endif + Tester::TestRegistrar<TestOutputNumbers> TestOutputNumbers::m_registrar("B1 Output number mismatching"); @@ -72,7 +76,11 @@ if (!initAdapted(p.get(), channels, _step, _step, r)) return r; if (!data) 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); @@ -122,7 +130,11 @@ if (!initDefaults(p.get(), channels, step, block, r)) return r; if (!data) data = createTestAudio(channels, block, 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);