comparison 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
comparison
equal deleted inserted replaced
27:5dcdc86d45d4 28:b1bc4d045a4b
48 #include <memory> 48 #include <memory>
49 using namespace std; 49 using namespace std;
50 50
51 #include <cmath> 51 #include <cmath>
52 52
53 #ifndef __GNUC__
54 #include <alloca.h>
55 #endif
56
53 Tester::TestRegistrar<TestSampleRates> 57 Tester::TestRegistrar<TestSampleRates>
54 TestSampleRates::m_registrar("F1 Different sample rates"); 58 TestSampleRates::m_registrar("F1 Different sample rates");
55 59
56 Tester::TestRegistrar<TestLengthyConstructor> 60 Tester::TestRegistrar<TestLengthyConstructor>
57 TestLengthyConstructor::m_registrar("F2 Lengthy constructor"); 61 TestLengthyConstructor::m_registrar("F2 Lengthy constructor");
95 continue; 99 continue;
96 } 100 }
97 101
98 data = createTestAudio(channels, _step, count); 102 data = createTestAudio(channels, _step, count);
99 for (size_t i = 0; i < count; ++i) { 103 for (size_t i = 0; i < count; ++i) {
104 #ifdef __GNUC__
100 float *ptr[channels]; 105 float *ptr[channels];
106 #else
107 float **ptr = (float **)alloca(channels * sizeof(float));
108 #endif
101 size_t idx = i * _step; 109 size_t idx = i * _step;
102 for (size_t c = 0; c < channels; ++c) ptr[c] = data[c] + idx; 110 for (size_t c = 0; c < channels; ++c) ptr[c] = data[c] + idx;
103 RealTime timestamp = RealTime::frame2RealTime(idx, rate); 111 RealTime timestamp = RealTime::frame2RealTime(idx, rate);
104 Plugin::FeatureSet fs = p->process(ptr, timestamp); 112 Plugin::FeatureSet fs = p->process(ptr, timestamp);
105 appendFeatures(f, fs); 113 appendFeatures(f, fs);