Revision 28:b1bc4d045a4b TestMultipleRuns.cpp
| TestMultipleRuns.cpp | ||
|---|---|---|
| 47 | 47 |
|
| 48 | 48 |
#include <cmath> |
| 49 | 49 |
|
| 50 |
#ifndef __GNUC__ |
|
| 51 |
#include <alloca.h> |
|
| 52 |
#endif |
|
| 53 |
|
|
| 50 | 54 |
Tester::TestRegistrar<TestDistinctRuns> |
| 51 | 55 |
TestDistinctRuns::m_registrar("D1 Consecutive runs with separate instances");
|
| 52 | 56 |
|
| ... | ... | |
| 76 | 80 |
if (!initAdapted(p.get(), channels, _step, _step, r)) return r; |
| 77 | 81 |
if (!data) data = createTestAudio(channels, _step, count); |
| 78 | 82 |
for (size_t i = 0; i < count; ++i) {
|
| 83 |
#ifdef __GNUC__ |
|
| 79 | 84 |
float *ptr[channels]; |
| 85 |
#else |
|
| 86 |
float **ptr = (float **)alloca(channels * sizeof(float)); |
|
| 87 |
#endif |
|
| 80 | 88 |
size_t idx = i * _step; |
| 81 | 89 |
for (size_t c = 0; c < channels; ++c) ptr[c] = data[c] + idx; |
| 82 | 90 |
RealTime timestamp = RealTime::frame2RealTime(idx, rate); |
| ... | ... | |
| 119 | 127 |
else if (!initAdapted(p.get(), channels, _step, _step, r)) return r; |
| 120 | 128 |
if (!data) data = createTestAudio(channels, _step, count); |
| 121 | 129 |
for (size_t i = 0; i < count; ++i) {
|
| 130 |
#ifdef __GNUC__ |
|
| 122 | 131 |
float *ptr[channels]; |
| 132 |
#else |
|
| 133 |
float **ptr = (float **)alloca(channels * sizeof(float)); |
|
| 134 |
#endif |
|
| 123 | 135 |
size_t idx = i * _step; |
| 124 | 136 |
for (size_t c = 0; c < channels; ++c) ptr[c] = data[c] + idx; |
| 125 | 137 |
RealTime timestamp = RealTime::frame2RealTime(idx, rate); |
| ... | ... | |
| 166 | 178 |
if (!data) data = createTestAudio(channels, _step, count); |
| 167 | 179 |
} |
| 168 | 180 |
for (size_t i = 0; i < count; ++i) {
|
| 181 |
#ifdef __GNUC__ |
|
| 169 | 182 |
float *ptr[channels]; |
| 183 |
#else |
|
| 184 |
float **ptr = (float **)alloca(channels * sizeof(float)); |
|
| 185 |
#endif |
|
| 170 | 186 |
size_t idx = i * _step; |
| 171 | 187 |
for (size_t c = 0; c < channels; ++c) ptr[c] = data[c] + idx; |
| 172 | 188 |
RealTime timestamp = RealTime::frame2RealTime(idx, rate); |
| ... | ... | |
| 212 | 228 |
if (!initAdapted(p.get(), channels, _step, _step, r)) return r; |
| 213 | 229 |
if (!data) data = createTestAudio(channels, _step, count); |
| 214 | 230 |
for (size_t i = 0; i < count; ++i) {
|
| 231 |
#ifdef __GNUC__ |
|
| 215 | 232 |
float *ptr[channels]; |
| 233 |
#else |
|
| 234 |
float **ptr = (float **)alloca(channels * sizeof(float)); |
|
| 235 |
#endif |
|
| 216 | 236 |
size_t idx = i * _step; |
| 217 | 237 |
for (size_t c = 0; c < channels; ++c) ptr[c] = data[c] + idx; |
| 218 | 238 |
RealTime timestamp = RealTime::frame2RealTime(idx, rate); |
Also available in: Unified diff