Revision 5:6a279da6fdd7 TestOutputs.cpp
| TestOutputs.cpp | ||
|---|---|---|
| 85 | 85 |
|
| 86 | 86 |
std::set<int> used; |
| 87 | 87 |
Plugin::OutputList outputs = p->getOutputDescriptors(); |
| 88 |
for (Plugin::FeatureSet::const_iterator i = fs.begin();
|
|
| 89 |
i != fs.end(); ++i) {
|
|
| 88 |
for (Plugin::FeatureSet::const_iterator i = f.begin(); |
|
| 89 |
i != f.end(); ++i) {
|
|
| 90 | 90 |
int o = i->first; |
| 91 | 91 |
used.insert(o); |
| 92 | 92 |
if (o < 0 || o >= (int)outputs.size()) {
|
| ... | ... | |
| 133 | 133 |
if (data) destroyTestAudio(data, channels); |
| 134 | 134 |
|
| 135 | 135 |
Plugin::OutputList outputs = p->getOutputDescriptors(); |
| 136 |
for (Plugin::FeatureSet::const_iterator i = fs.begin();
|
|
| 137 |
i != fs.end(); ++i) {
|
|
| 136 |
for (Plugin::FeatureSet::const_iterator i = f.begin(); |
|
| 137 |
i != f.end(); ++i) {
|
|
| 138 | 138 |
const Plugin::OutputDescriptor &o = outputs[i->first]; |
| 139 | 139 |
const Plugin::FeatureList &fl = i->second; |
| 140 | 140 |
for (int j = 0; j < (int)fl.size(); ++j) {
|
| 141 |
const Plugin::Feature &f = fl[j]; |
|
| 141 |
const Plugin::Feature &fe = fl[j];
|
|
| 142 | 142 |
switch (o.sampleType) {
|
| 143 | 143 |
case Plugin::OutputDescriptor::OneSamplePerStep: |
| 144 |
if (f.hasTimestamp) {
|
|
| 144 |
if (fe.hasTimestamp) {
|
|
| 145 | 145 |
r.push_back(note("Plugin returns features with timestamps on OneSamplePerStep output"));
|
| 146 | 146 |
} |
| 147 |
if (f.hasDuration) {
|
|
| 147 |
if (fe.hasDuration) {
|
|
| 148 | 148 |
r.push_back(note("Plugin returns features with durations on OneSamplePerStep output"));
|
| 149 | 149 |
} |
| 150 | 150 |
break; |
| 151 | 151 |
case Plugin::OutputDescriptor::FixedSampleRate: |
| 152 | 152 |
break; |
| 153 | 153 |
case Plugin::OutputDescriptor::VariableSampleRate: |
| 154 |
if (!f.hasTimestamp) {
|
|
| 154 |
if (!fe.hasTimestamp) {
|
|
| 155 | 155 |
r.push_back(error("Plugin returns features with no timestamps on VariableSampleRate output"));
|
| 156 | 156 |
} |
| 157 | 157 |
break; |
Also available in: Unified diff