diff src/vamp-hostsdk/PluginLoader.cpp @ 462:6ac615fd02a3

Merge from branch vampipe
author Chris Cannam
date Mon, 10 Oct 2016 15:51:33 +0100
parents 85dadd0d482f
children a94ab90dfd53
line wrap: on
line diff
--- a/src/vamp-hostsdk/PluginLoader.cpp	Mon Oct 10 15:48:35 2016 +0100
+++ b/src/vamp-hostsdk/PluginLoader.cpp	Mon Oct 10 15:51:33 2016 +0100
@@ -61,7 +61,8 @@
     virtual ~Impl();
 
     PluginKeyList listPlugins();
-    PluginStaticDataList listPluginData();
+
+    ListResponse listPluginData();
 
     Plugin *loadPlugin(PluginKey key,
                        float inputSampleRate,
@@ -149,7 +150,7 @@
     return m_impl->listPlugins();
 }
 
-PluginLoader::PluginStaticDataList
+ListResponse
 PluginLoader::listPluginData() 
 {
     return m_impl->listPluginData();
@@ -222,23 +223,24 @@
     return plugins;
 }
 
-PluginLoader::PluginStaticDataList
+ListResponse
 PluginLoader::Impl::listPluginData() 
 {
     PluginKeyList keys = listPlugins();
-    PluginStaticDataList dataList;
+    ListResponse response;
 
     for (PluginKeyList::const_iterator ki = keys.begin(); ki != keys.end(); ++ki) {
         string key = *ki;
 	Plugin *p = loadPlugin(key, 44100, 0);
 	if (p) {
             PluginCategoryHierarchy category = getPluginCategory(key);
-	    dataList.push_back(PluginStaticData::fromPlugin(key, category, p));
+            response.available.push_back
+                (PluginStaticData::fromPlugin(key, category, p));
 	}
         delete p;
     }
 
-    return dataList;
+    return response;
 }
 
 void
@@ -469,6 +471,8 @@
 
     ConfigurationResponse response;
 
+    response.plugin = req.plugin;
+    
     if (req.plugin->initialise(req.configuration.channelCount,
                                req.configuration.stepSize,
                                req.configuration.blockSize)) {