summaryrefslogtreecommitdiff
path: root/libs/ardour/vst_info_file.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2014-05-28 01:59:19 +0200
committerRobin Gareus <robin@gareus.org>2014-05-28 01:59:19 +0200
commit84ccf721ba43ed5bc41ecf4dea4cd5149d1cce2c (patch)
tree1bb019cecc7ef5e51692c25e6f337213ab888e90 /libs/ardour/vst_info_file.cc
parentc03b6585314d2a972cf14c2f04dfdd760e98b57f (diff)
VST: properly query name from plugin
Diffstat (limited to 'libs/ardour/vst_info_file.cc')
-rw-r--r--libs/ardour/vst_info_file.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/libs/ardour/vst_info_file.cc b/libs/ardour/vst_info_file.cc
index f74bdca771..693bb6ba9e 100644
--- a/libs/ardour/vst_info_file.cc
+++ b/libs/ardour/vst_info_file.cc
@@ -611,10 +611,22 @@ vstfx_parse_vst_state (VSTState* vstfx)
string with any name*/
char creator[65] = "Unknown\0";
+ char name[65] = "Unknown\0";
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' */