comparison TestMultipleRuns.cpp @ 11:82ef943a1bd2

* fix bug in init/reset ordering in test-multiple-runs-with-reset
author cannam
date Wed, 18 Mar 2009 11:50:19 +0000
parents 3019cb6b538d
children df121992f23a
comparison
equal deleted inserted replaced
10:0c1c60654125 11:82ef943a1bd2
114 114
115 auto_ptr<Plugin> p(load(key, rate)); 115 auto_ptr<Plugin> p(load(key, rate));
116 116
117 for (int run = 0; run < 2; ++run) { 117 for (int run = 0; run < 2; ++run) {
118 if (run == 1) p->reset(); 118 if (run == 1) p->reset();
119 if (!initAdapted(p.get(), channels, _step, _step, r)) return r; 119 else if (!initAdapted(p.get(), channels, _step, _step, r)) return r;
120 if (!data) data = createTestAudio(channels, _step, count); 120 if (!data) data = createTestAudio(channels, _step, count);
121 for (size_t i = 0; i < count; ++i) { 121 for (size_t i = 0; i < count; ++i) {
122 float *ptr[channels]; 122 float *ptr[channels];
123 size_t idx = i * _step; 123 size_t idx = i * _step;
124 for (size_t c = 0; c < channels; ++c) ptr[c] = data[c] + idx; 124 for (size_t c = 0; c < channels; ++c) ptr[c] = data[c] + idx;