add latency callback to dummy backend
[ardour.git] / libs / ardour / vst_info_file.cc
index f74bdca771fbedccc0442324849a0d0bf92c3cc4..da49d1b8eb79fd18ca30ff9f02a7cd14999e16da 100644 (file)
@@ -610,14 +610,26 @@ vstfx_parse_vst_state (VSTState* vstfx)
          fail to implement getVendorString, and so won't stuff the
          string with any name*/
 
-       char creator[65] = "Unknown\0";
+       char creator[65] = "Unknown";
+       char name[65] = "";
 
        AEffect* plugin = vstfx->plugin;
 
-       info->name = strdup (vstfx->handle->name);
+
+       plugin->dispatcher (plugin, effGetEffectName, 0, 0, name, 0);
+
+       if (strlen(name) == 0) {
+               plugin->dispatcher (plugin, effGetProductString, 0, 0, name, 0);
+       }
+
+       if (strlen(name) == 0) {
+               info->name = strdup (vstfx->handle->name);
+       } else {
+               info->name = strdup (name);
+       }
 
        /*If the plugin doesn't bother to implement GetVendorString we will
-         have pre-stuffed the string with 'Unkown' */
+         have pre-stuffed the string with 'Unknown' */
 
        plugin->dispatcher (plugin, effGetVendorString, 0, 0, creator, 0);
 
@@ -703,7 +715,7 @@ vstfx_info_from_plugin (const char *dllpath, VSTState* vstfx, vector<VSTInfo *>
                string path = vstfx->handle->path;
 
                do {
-                       char name[65] = "Unknown\0";
+                       char name[65] = "Unknown";
                        id = plugin->dispatcher (plugin, effShellGetNextPlugin, 0, 0, name, 0);
                        ids.push_back(std::make_pair(id, name));
                } while ( id != 0 );