[SCM] calf/master: + DSSI: properly support factory/user preset distinction
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:37:21 UTC 2013
The following commit has been merged in the master branch:
commit 6e52635ded2892744070a4c5886fefe2cd0d2d7c
Author: kfoltman <kfoltman at 78b06b96-2940-0410-b7fc-879d825d01d8>
Date: Sat Jun 28 15:27:33 2008 +0000
+ DSSI: properly support factory/user preset distinction
git-svn-id: https://calf.svn.sourceforge.net/svnroot/calf/trunk@214 78b06b96-2940-0410-b7fc-879d825d01d8
diff --git a/src/calf/giface.h b/src/calf/giface.h
index 6ee1c36..ff8bf76 100644
--- a/src/calf/giface.h
+++ b/src/calf/giface.h
@@ -333,9 +333,11 @@ struct ladspa_wrapper
presets = new std::vector<plugin_preset>;
preset_descs = new std::vector<DSSI_Program_Descriptor>;
- preset_list plist;
- plist.load_defaults(false);
+ preset_list plist_tmp, plist;
plist.load_defaults(true);
+ plist_tmp.load_defaults(false);
+ plist.presets.insert(plist.presets.end(), plist_tmp.presets.begin(), plist_tmp.presets.end());
+
// XXXKF this assumes that plugin name in preset is case-insensitive equal to plugin label
// if I forget about this, I'll be in a deep trouble
dssi_default_program.Bank = 0;
diff --git a/src/dssigui.cpp b/src/dssigui.cpp
index 333a6ab..ac2d940 100644
--- a/src/dssigui.cpp
+++ b/src/dssigui.cpp
@@ -251,8 +251,10 @@ struct dssi_osc_server: public osc_server, public osc_message_sink<osc_strstream
window->create(plugin, title.c_str(), effect_name.c_str());
plugin->gui = window->gui;
gtk_signal_connect(GTK_OBJECT(window->toplevel), "destroy", G_CALLBACK(on_destroy), this);
+ vector<plugin_preset> tmp_presets;
builtin_presets.get_for_plugin(presets, effect_name.c_str());
- user_presets.get_for_plugin(presets, effect_name.c_str());
+ user_presets.get_for_plugin(tmp_presets, effect_name.c_str());
+ presets.insert(presets.end(), tmp_presets.begin(), tmp_presets.end());
}
virtual void receive_osc_message(std::string address, std::string args, osc_strstream &buffer)
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list