Mercurial > hg > vamp-plugin-tester
diff TestMultipleRuns.cpp @ 28:b1bc4d045a4b vamp-plugin-tester-v1.0
* Solaris build fixes
author | cannam |
---|---|
date | Thu, 24 Sep 2009 14:11:14 +0000 |
parents | df121992f23a |
children | 07144cdcbedf |
line wrap: on
line diff
--- a/TestMultipleRuns.cpp Thu Sep 24 13:34:18 2009 +0000 +++ b/TestMultipleRuns.cpp Thu Sep 24 14:11:14 2009 +0000 @@ -47,6 +47,10 @@ #include <cmath> +#ifndef __GNUC__ +#include <alloca.h> +#endif + Tester::TestRegistrar<TestDistinctRuns> TestDistinctRuns::m_registrar("D1 Consecutive runs with separate instances"); @@ -76,7 +80,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); @@ -119,7 +127,11 @@ else 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); @@ -166,7 +178,11 @@ 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); @@ -212,7 +228,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);