summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-24 22:33:40 +0000
committerDavid Robillard <d@drobilla.net>2007-07-24 22:33:40 +0000
commitffa9a1bb9c0b99f49cca1d9fca9cd4cb1d7582c6 (patch)
tree8ffebc52d1a02ba03326e50ad2019279db6aa3c1 /src
parentbac31a50f17608c514afce5ad014316cccde3d5a (diff)
downloadingen-ffa9a1bb9c0b99f49cca1d9fca9cd4cb1d7582c6.tar.gz
ingen-ffa9a1bb9c0b99f49cca1d9fca9cd4cb1d7582c6.tar.bz2
ingen-ffa9a1bb9c0b99f49cca1d9fca9cd4cb1d7582c6.zip
Work around broken LADSPA plugins with screwy range/default (fix ticket 59).
Fix undefined reference to metadata request (from last commit). git-svn-id: http://svn.drobilla.net/lad/ingen@615 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/libs/engine/LADSPANode.cpp11
-rw-r--r--src/libs/engine/QueuedEngineInterface.cpp5
-rw-r--r--src/libs/engine/QueuedEngineInterface.hpp2
-rw-r--r--src/libs/gui/LoadPluginWindow.cpp9
4 files changed, 22 insertions, 5 deletions
diff --git a/src/libs/engine/LADSPANode.cpp b/src/libs/engine/LADSPANode.cpp
index 9f030aee..b5451ac3 100644
--- a/src/libs/engine/LADSPANode.cpp
+++ b/src/libs/engine/LADSPANode.cpp
@@ -121,6 +121,17 @@ LADSPANode::instantiate()
Sample default_val, min, max;
get_port_limits(j, default_val, min, max);
+ // Work around broke-ass crackhead plugins
+ if (default_val < min) {
+ cerr << "WARNING: Broken LADSPA: Port default < minimum. Minimum adjusted." << endl;
+ min = default_val;
+ }
+
+ if (default_val > max) {
+ cerr << "WARNING: Broken LADSPA: Port default > maximum. Maximum adjusted." << endl;
+ max = default_val;
+ }
+
// Set default value
if (port->buffer_size() == 1) {
for (size_t i=0; i < _poly; ++i)
diff --git a/src/libs/engine/QueuedEngineInterface.cpp b/src/libs/engine/QueuedEngineInterface.cpp
index f54f850a..a8906c97 100644
--- a/src/libs/engine/QueuedEngineInterface.cpp
+++ b/src/libs/engine/QueuedEngineInterface.cpp
@@ -304,6 +304,11 @@ QueuedEngineInterface::request_port_value(const string& port_path)
push_queued(new RequestPortValueEvent(_engine, _responder, now(), port_path));
}
+void
+QueuedEngineInterface::request_metadata(const string& object_path, const string& key)
+{
+ push_queued(new RequestMetadataEvent(_engine, _responder, now(), object_path, key));
+}
void
QueuedEngineInterface::request_plugins()
diff --git a/src/libs/engine/QueuedEngineInterface.hpp b/src/libs/engine/QueuedEngineInterface.hpp
index 889b8f8e..7b0f32d4 100644
--- a/src/libs/engine/QueuedEngineInterface.hpp
+++ b/src/libs/engine/QueuedEngineInterface.hpp
@@ -147,7 +147,7 @@ public:
virtual void request_port_value(const string& port_path);
- virtual void request_metadata(const string& path, const string& key);
+ virtual void request_metadata(const string& object_path, const string& key);
virtual void request_plugins();
diff --git a/src/libs/gui/LoadPluginWindow.cpp b/src/libs/gui/LoadPluginWindow.cpp
index cc7c7e71..194b6636 100644
--- a/src/libs/gui/LoadPluginWindow.cpp
+++ b/src/libs/gui/LoadPluginWindow.cpp
@@ -18,7 +18,7 @@
#include <iostream>
#include <cassert>
#include <algorithm>
-#include <cctype>
+#include <ctype.h>
#include "interface/EngineInterface.hpp"
#include "client/NodeModel.hpp"
#include "client/PatchModel.hpp"
@@ -28,7 +28,8 @@
#include "PatchWindow.hpp"
#include "PatchView.hpp"
#include "PatchCanvas.hpp"
-using std::cout; using std::cerr; using std::endl;
+
+using namespace std;
namespace Ingen {
@@ -379,7 +380,7 @@ LoadPluginWindow::filter_changed()
_plugins_liststore->clear();
string search = _search_entry->get_text();
- transform(search.begin(), search.end(), search.begin(), toupper);
+ transform(search.begin(), search.end(), search.begin(), ::toupper);
// Get selected criteria
const Gtk::TreeModel::Row row = *(_filter_combo->get_active());
@@ -412,7 +413,7 @@ LoadPluginWindow::filter_changed()
throw;
}
- transform(field.begin(), field.end(), field.begin(), toupper);
+ transform(field.begin(), field.end(), field.begin(), ::toupper);
if (field.find(search) != string::npos) {
model_iter = _plugins_liststore->append();