#include "ardour/plugin_insert.h"
#include "ardour/session.h"
-#include <lrdf.h>
-
#include "ardour_ui.h"
#include "prompter.h"
#include "plugin_ui.h"
#endif
#include <cstdio>
-#include <lrdf.h>
#include <map>
#include <algorithm>
#include "lv2_plugin_ui.h"
#endif
-#include <lrdf.h>
-
#include "ardour_window.h"
#include "ardour_ui.h"
#include "prompter.h"
*/
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
#include <sstream>
#include <libxml/uri.h>
+#ifdef HAVE_LRDF
#include <lrdf.h>
+#endif
+
#include <glibmm/miscutils.h>
#include <glibmm/convert.h>
touch_file(sfdb_file_path);
+#ifdef HAVE_LRDF
lrdf_read_file(src.c_str());
+#endif
}
AudioLibrary::~AudioLibrary ()
void
AudioLibrary::save_changes ()
{
+#ifdef HAVE_LRDF
if (lrdf_export_by_source(src.c_str(), src.substr(5).c_str())) {
PBD::warning << string_compose(_("Could not open %1. Audio Library not saved"), src) << endmsg;
}
+#endif
}
void
AudioLibrary::set_tags (string member, vector<string> tags)
{
+#ifdef HAVE_LRDF
sort (tags.begin(), tags.end());
tags.erase (unique(tags.begin(), tags.end()), tags.end());
for (vector<string>::iterator i = tags.begin(); i != tags.end(); ++i) {
lrdf_add_triple (src.c_str(), file_uri.c_str(), TAG, (*i).c_str(), lrdf_literal);
}
+#endif
}
vector<string>
AudioLibrary::get_tags (string member)
{
vector<string> tags;
+#ifdef HAVE_LRDF
lrdf_statement pattern;
pattern.subject = strdup(Glib::filename_to_uri(member).c_str());
lrdf_free_statements (matches);
sort (tags.begin(), tags.end());
-
+#endif
return tags;
}
void
AudioLibrary::search_members_and (vector<string>& members, const vector<string>& tags)
{
+#ifdef HAVE_LRDF
lrdf_statement **head;
lrdf_statement* pattern = 0;
lrdf_statement* old = 0;
pattern = pattern->next;
delete old;
}
+#endif
}
#include <glibmm/fileutils.h>
#include <glibmm/miscutils.h>
+#ifdef HAVE_LRDF
#include <lrdf.h>
+#endif
#include "pbd/cpus.h"
#include "pbd/error.h"
// allow ardour the absolute maximum number of open files
lotsa_files_please ();
+#ifdef HAVE_LRDF
lrdf_init();
+#endif
Library = new AudioLibrary;
BootMessage (_("Loading configuration"));
ARDOUR::cleanup ()
{
delete Library;
+#ifdef HAVE_LRDF
lrdf_cleanup ();
+#endif
delete &ControlProtocolManager::instance();
#ifdef WINDOWS_VST_SUPPORT
fst_exit ();
*/
+#ifdef WAF_BUILD
+#include "libardour-config.h"
+#endif
+
#include <inttypes.h>
#include <vector>
#include <sys/stat.h>
#include <cerrno>
+#ifdef HAVE_LRDF
#include <lrdf.h>
+#endif
#include "pbd/compose.h"
#include "pbd/error.h"
boost::shared_ptr<Plugin::ScalePoints>
LadspaPlugin::get_scale_points(uint32_t port_index) const
{
+ boost::shared_ptr<Plugin::ScalePoints> ret;
+#ifdef HAVE_LRDF
const uint32_t id = atol(unique_id().c_str());
lrdf_defaults* points = lrdf_get_scale_values(id, port_index);
- boost::shared_ptr<Plugin::ScalePoints> ret;
if (!points) {
return ret;
}
}
lrdf_free_setting_values(points);
+#endif
return ret;
}
void
LadspaPlugin::find_presets ()
{
+#ifdef HAVE_LRDF
uint32_t id;
std::string unique (unique_id());
}
lrdf_free_uris(set_uris);
}
+#endif
}
bool
LadspaPlugin::load_preset (PresetRecord r)
{
+#ifdef HAVE_LRDF
lrdf_defaults* defs = lrdf_get_setting_values (r.uri.c_str());
if (defs) {
}
Plugin::load_preset (r);
+#endif
return true;
}
static void
lrdf_remove_preset (const char* /*source*/, const char *setting_uri)
{
+#ifdef HAVE_LRDF
lrdf_statement p;
lrdf_statement *q;
lrdf_statement *i;
p.predicate = NULL;
p.object = NULL;
lrdf_remove_matches (&p);
+#endif
}
void
LadspaPlugin::do_remove_preset (string name)
{
+#ifdef HAVE_LRDF
string const envvar = preset_envvar ();
if (envvar.empty()) {
warning << _("Could not locate HOME. Preset not removed.") << endmsg;
lrdf_remove_preset (source.c_str(), p->uri.c_str ());
write_preset_file (envvar);
+#endif
}
string
bool
LadspaPlugin::write_preset_file (string envvar)
{
+#ifdef HAVE_LRDF
string path = string_compose("%1/.ladspa", envvar);
if (g_mkdir_with_parents (path.c_str(), 0775)) {
warning << string_compose(_("Could not create %1. Preset not saved. (%2)"), path, strerror(errno)) << endmsg;
}
return true;
+#else
+ return false;
+#endif
}
string
LadspaPlugin::do_save_preset (string name)
{
+#ifdef HAVE_LRDF
/* make a vector of pids that are input parameters */
vector<int> input_parameter_pids;
for (uint32_t i = 0; i < parameter_count(); ++i) {
}
return uri;
+#else
+ return string();
+#endif
}
LADSPA_PortDescriptor
#include <cerrno>
#include <utility>
+#ifdef HAVE_LRDF
#include <lrdf.h>
+#endif
#include "pbd/compose.h"
#include "pbd/error.h"
#include <sys/types.h>
#include <cstdio>
-#include <lrdf.h>
#include <cstdlib>
#include <fstream>
+#ifdef HAVE_LRDF
+#include <lrdf.h>
+#endif
+
#ifdef WINDOWS_VST_SUPPORT
#include "fst.h"
#include "pbd/basename.h"
void
PluginManager::add_presets(string domain)
{
-
+#ifdef HAVE_LRDF
PathScanner scanner;
vector<string *> *presets;
vector<string *>::iterator x;
vector_delete (presets);
}
+#endif
}
void
PluginManager::add_lrdf_data (const string &path)
{
+#ifdef HAVE_LRDF
PathScanner scanner;
vector<string *>* rdf_files;
vector<string *>::iterator x;
vector_delete (rdf_files);
}
+#endif
}
int
string
PluginManager::get_ladspa_category (uint32_t plugin_id)
{
+#ifdef HAVE_LRDF
char buf[256];
lrdf_statement pattern;
} else {
return label;
}
+#else
+ return ("Unknown");
+#endif
}
#ifdef LV2_SUPPORT