diff options
author | Carl Hetherington <carl@carlh.net> | 2010-12-15 02:21:25 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2010-12-15 02:21:25 +0000 |
commit | 0e74620ad469eb9d2ab9cb2f57ff650b2c796a00 (patch) | |
tree | 2fccaff29bd42ed8ce43f085aca0249ddbfecca1 /libs/ardour/vst_plugin.cc | |
parent | 3a1af63fedc4792a3c98de446d031bfe27e9202d (diff) |
Make VST preset files pre-preset rather than global. Clean up VST preset handling to use more of the bas class' code.
git-svn-id: svn://localhost/ardour2/branches/3.0@8279 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/vst_plugin.cc')
-rw-r--r-- | libs/ardour/vst_plugin.cc | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/libs/ardour/vst_plugin.cc b/libs/ardour/vst_plugin.cc index e77fc483ed..625e4482b3 100644 --- a/libs/ardour/vst_plugin.cc +++ b/libs/ardour/vst_plugin.cc @@ -425,8 +425,9 @@ VSTPlugin::do_save_preset (string name) sys::path f = ARDOUR::user_config_directory (); f /= "presets"; - f /= "vst"; + f /= presets_file (); + cout << "Write presets to " << f.to_string () << "\n"; t->write (f.to_string ()); delete t; return uri; @@ -449,8 +450,9 @@ VSTPlugin::do_remove_preset (string name) sys::path f = ARDOUR::user_config_directory (); f /= "presets"; - f /= "vst"; + f /= presets_file (); + cout << "Write presets to " << f.to_string () << "\n"; t->write (f.to_string ()); delete t; } @@ -711,7 +713,7 @@ VSTPlugin::presets_tree () const create_directory (p); } - p /= "vst"; + p /= presets_file (); if (!exists (p)) { t->set_root (new XMLNode (X_("VSTPresets"))); @@ -734,7 +736,14 @@ VSTPlugin::first_user_preset_index () const return _plugin->numPrograms; } +string +VSTPlugin::presets_file () const +{ + return string_compose ("vst-%1", unique_id ()); +} + VSTPluginInfo::VSTPluginInfo() { type = ARDOUR::VST; } + |