summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/DeprecatedLoader.cpp2
-rw-r--r--src/libs/client/OSCClientReceiver.cpp2
-rw-r--r--src/libs/client/ObjectModel.cpp1
-rw-r--r--src/libs/client/PluginUI.cpp19
-rw-r--r--src/libs/client/PortModel.cpp6
-rw-r--r--src/libs/client/Store.cpp2
6 files changed, 21 insertions, 11 deletions
diff --git a/src/libs/client/DeprecatedLoader.cpp b/src/libs/client/DeprecatedLoader.cpp
index 68f7941d..4897137c 100644
--- a/src/libs/client/DeprecatedLoader.cpp
+++ b/src/libs/client/DeprecatedLoader.cpp
@@ -160,7 +160,7 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
/* Use parameter overridden polyphony, if given */
GraphObject::Variables::iterator poly_param = initial_data.find("ingen:polyphony");
if (poly_param != initial_data.end() && poly_param->second.type() == Atom::INT)
- poly = poly_param->second;
+ poly = poly_param->second.get_int32();
if (initial_data.find("filename") == initial_data.end())
initial_data["filename"] = Atom(filename.c_str()); // FIXME: URL?
diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp
index 04b83d61..6002ca59 100644
--- a/src/libs/client/OSCClientReceiver.cpp
+++ b/src/libs/client/OSCClientReceiver.cpp
@@ -35,7 +35,7 @@ OSCClientReceiver::OSCClientReceiver(int listen_port)
_listen_port(listen_port),
_st(NULL)
{
- start(true); // true = dump, false = shutup
+ start(false); // true = dump, false = shutup
}
diff --git a/src/libs/client/ObjectModel.cpp b/src/libs/client/ObjectModel.cpp
index 1d22c8eb..b951bc6b 100644
--- a/src/libs/client/ObjectModel.cpp
+++ b/src/libs/client/ObjectModel.cpp
@@ -124,7 +124,6 @@ ObjectModel::set(SharedPtr<ObjectModel> model)
if (mine != _variables.end()) {
cerr << "WARNING: " << _path << "Client/Server data mismatch: " << other->first << endl;
- cerr << "Setting server value " << other->second;
}
_variables[other->first] = other->second;
diff --git a/src/libs/client/PluginUI.cpp b/src/libs/client/PluginUI.cpp
index 5215de25..9dcbfcba 100644
--- a/src/libs/client/PluginUI.cpp
+++ b/src/libs/client/PluginUI.cpp
@@ -16,12 +16,14 @@
*/
#include <iostream>
+#include "shared/LV2URIMap.hpp"
#include "PluginUI.hpp"
#include "NodeModel.hpp"
#include "PortModel.hpp"
using namespace std;
using Ingen::Shared::EngineInterface;
+using Ingen::Shared::LV2URIMap;
namespace Ingen {
namespace Client {
@@ -33,6 +35,7 @@ lv2_ui_write(LV2UI_Controller controller,
uint32_t format,
const void* buffer)
{
+#if 0
cerr << "********* LV2 UI WRITE (FORMAT " << format << "):" << endl;
/*lv2_osc_message_print((const LV2Message*)buffer);*/
@@ -45,16 +48,24 @@ lv2_ui_write(LV2UI_Controller controller,
fprintf(stderr, "%2X ", ((unsigned char*)buffer)[i]);
}
fprintf(stderr, "\n");
+#endif
PluginUI* ui = (PluginUI*)controller;
SharedPtr<PortModel> port = ui->node()->ports()[port_index];
- if (format == 0) {
- ui->world()->engine->set_port_value_immediate(port->path(),
- port->type().uri(),
- buffer_size, buffer);
+ LV2URIMap* map = (LV2URIMap*)ui->world()->lv2_features->feature(LV2_URI_MAP_URI);
+ assert(map);
+
+ if (format == 0) { // float (special case)
+ assert(buffer_size == 4);
+ if (*(float*)buffer == port->value().get_float())
+ return; // do nothing (handle stupid plugin UIs that feed back)
}
+
+ ui->world()->engine->set_port_value_immediate(port->path(),
+ port->type().uri(),
+ buffer_size, buffer);
}
diff --git a/src/libs/client/PortModel.cpp b/src/libs/client/PortModel.cpp
index 6b727747..ecf1070b 100644
--- a/src/libs/client/PortModel.cpp
+++ b/src/libs/client/PortModel.cpp
@@ -26,7 +26,7 @@ bool
PortModel::is_logarithmic() const
{
const Atom& hint = get_variable("ingen:logarithmic");
- return (hint && hint > 0);
+ return (hint.is_valid() && hint.get_bool() > 0);
}
@@ -34,7 +34,7 @@ bool
PortModel::is_integer() const
{
const Atom& hint = get_variable("ingen:integer");
- return (hint && hint > 0);
+ return (hint.is_valid() && hint.get_bool() > 0);
}
@@ -42,7 +42,7 @@ bool
PortModel::is_toggle() const
{
const Atom& hint = get_variable("ingen:toggled");
- return (hint && hint > 0);
+ return (hint.is_valid() && hint.get_bool() > 0);
}
} // namespace Client
diff --git a/src/libs/client/Store.cpp b/src/libs/client/Store.cpp
index b679b01a..1eea354a 100644
--- a/src/libs/client/Store.cpp
+++ b/src/libs/client/Store.cpp
@@ -511,7 +511,7 @@ Store::variable_change_event(const Path& subject_path, const string& predicate,
{
SharedPtr<ObjectModel> subject = object(subject_path);
- if (!value) {
+ if (!value.is_valid()) {
cerr << "ERROR: variable '" << predicate << "' has no type" << endl;
} else if (subject) {
subject->set_variable(predicate, value);