Revision 28:b1bc4d045a4b TestInitialise.cpp
| TestInitialise.cpp | ||
|---|---|---|
| 50 | 50 |
|
| 51 | 51 |
#include <cmath> |
| 52 | 52 |
|
| 53 |
#ifndef __GNUC__ |
|
| 54 |
#include <alloca.h> |
|
| 55 |
#endif |
|
| 56 |
|
|
| 53 | 57 |
Tester::TestRegistrar<TestSampleRates> |
| 54 | 58 |
TestSampleRates::m_registrar("F1 Different sample rates");
|
| 55 | 59 |
|
| ... | ... | |
| 97 | 101 |
|
| 98 | 102 |
data = createTestAudio(channels, _step, count); |
| 99 | 103 |
for (size_t i = 0; i < count; ++i) {
|
| 104 |
#ifdef __GNUC__ |
|
| 100 | 105 |
float *ptr[channels]; |
| 106 |
#else |
|
| 107 |
float **ptr = (float **)alloca(channels * sizeof(float)); |
|
| 108 |
#endif |
|
| 101 | 109 |
size_t idx = i * _step; |
| 102 | 110 |
for (size_t c = 0; c < channels; ++c) ptr[c] = data[c] + idx; |
| 103 | 111 |
RealTime timestamp = RealTime::frame2RealTime(idx, rate); |
Also available in: Unified diff