Revision 60:9f2a6d843639
| .hgsubstate | ||
|---|---|---|
| 1 |
c42aeb56d8288001ff45d6f00594e5f5b1e8f3de vamp-plugin-sdk |
|
| 1 |
1522e2f6d7005e094b56caebc91e181cbbf76296 vamp-plugin-sdk |
|
| TestOutputs.cpp | ||
|---|---|---|
| 120 | 120 |
auto_ptr<Plugin> p(PluginLoader::getInstance()->loadPlugin |
| 121 | 121 |
(key, rate, PluginLoader::ADAPT_ALL_SAFE)); |
| 122 | 122 |
|
| 123 |
Results r; |
|
| 123 | 124 |
Plugin::FeatureSet f; |
| 124 |
Results r; |
|
| 125 | 125 |
float **data = 0; |
| 126 | 126 |
size_t channels = 0; |
| 127 | 127 |
size_t step = 0, block = 0; |
| 128 | 128 |
size_t count = 100; |
| 129 | 129 |
|
| 130 | 130 |
if (!initDefaults(p.get(), channels, step, block, r)) return r; |
| 131 |
|
|
| 132 |
Plugin::OutputList outputs = p->getOutputDescriptors(); |
|
| 133 |
for (int i = 0; i < (int)outputs.size(); ++i) {
|
|
| 134 |
if (outputs[i].sampleType == Plugin::OutputDescriptor::FixedSampleRate && |
|
| 135 |
outputs[i].sampleRate == 0.f) {
|
|
| 136 |
r.push_back(error("Plugin output \"" + outputs[i].identifier +
|
|
| 137 |
"\" has FixedSampleRate but gives sample rate as 0")); |
|
| 138 |
} |
|
| 139 |
} |
|
| 140 |
|
|
| 131 | 141 |
if (!data) data = createTestAudio(channels, block, count); |
| 132 | 142 |
for (size_t i = 0; i < count; ++i) {
|
| 133 | 143 |
#ifdef __GNUC__ |
| ... | ... | |
| 145 | 155 |
appendFeatures(f, fs); |
| 146 | 156 |
if (data) destroyTestAudio(data, channels); |
| 147 | 157 |
|
| 148 |
Plugin::OutputList outputs = p->getOutputDescriptors(); |
|
| 149 | 158 |
for (Plugin::FeatureSet::const_iterator i = f.begin(); |
| 150 | 159 |
i != f.end(); ++i) {
|
| 151 | 160 |
const Plugin::OutputDescriptor &o = outputs[i->first]; |
Also available in: Unified diff