Mercurial > hg > sonic-annotator
comparison runner/FeatureExtractionManager.h @ 109:78a7c77ba432
A more general solution (I hope) to the problem of making sure transforms are always run in a consistent order
| author | Chris Cannam |
|---|---|
| date | Thu, 02 Oct 2014 14:54:09 +0100 |
| parents | 8b4924a9a072 |
| children | ca565b18ba3e |
comparison
equal
deleted
inserted
replaced
| 108:8b4924a9a072 | 109:78a7c77ba432 |
|---|---|
| 77 | 77 |
| 78 typedef map<Transform, vector<FeatureWriter *> > TransformWriterMap; | 78 typedef map<Transform, vector<FeatureWriter *> > TransformWriterMap; |
| 79 typedef map<Vamp::Plugin *, TransformWriterMap> PluginMap; | 79 typedef map<Vamp::Plugin *, TransformWriterMap> PluginMap; |
| 80 PluginMap m_plugins; | 80 PluginMap m_plugins; |
| 81 | 81 |
| 82 // When we run plugins, we want to run them in a known order so as | |
| 83 // to get the same results on each run of Sonic Annotator with the | |
| 84 // same transforms. But if we just iterate through our PluginMap, | |
| 85 // we get them in an arbitrary order based on pointer | |
| 86 // address. This vector provides an underlying order for us. Note | |
| 87 // that the TransformWriterMap is consistently ordered (because | |
| 88 // the key is a Transform which has a proper ordering) so using | |
| 89 // this gives us a consistent order across the whole PluginMap | |
| 90 vector<Vamp::Plugin *> m_orderedPlugins; | |
| 91 | |
| 82 // And a map back from transforms to their plugins. Note that | 92 // And a map back from transforms to their plugins. Note that |
| 83 // this is keyed by transform, not transform ID -- two differently | 93 // this is keyed by transform, not transform ID -- two differently |
| 84 // configured transforms with the same ID must use different | 94 // configured transforms with the same ID must use different |
| 85 // plugin instances. | 95 // plugin instances. |
| 86 | 96 |
