summaryrefslogtreecommitdiffstats
path: root/src/libs/client
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-05-19 21:36:34 +0000
committerDavid Robillard <d@drobilla.net>2008-05-19 21:36:34 +0000
commitf9eba59332ee7e45ffbfebcd0ce79e8e0cfd9ec4 (patch)
treefa8a4a74ee4072987ed79ffdcf766730bcdc0790 /src/libs/client
parentee173c38c5c0a385c46bec12e3f52c57e0e074a0 (diff)
downloadingen-f9eba59332ee7e45ffbfebcd0ce79e8e0cfd9ec4.tar.gz
ingen-f9eba59332ee7e45ffbfebcd0ce79e8e0cfd9ec4.tar.bz2
ingen-f9eba59332ee7e45ffbfebcd0ce79e8e0cfd9ec4.zip
More (but not yet completely) type safe value_changed notification.
git-svn-id: http://svn.drobilla.net/lad/ingen@1216 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client')
-rw-r--r--src/libs/client/OSCClientReceiver.cpp2
-rw-r--r--src/libs/client/PluginModel.cpp2
-rw-r--r--src/libs/client/PluginUI.cpp16
-rw-r--r--src/libs/client/PortModel.hpp8
4 files changed, 13 insertions, 15 deletions
diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp
index 6002ca59..04b83d61 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(false); // true = dump, false = shutup
+ start(true); // true = dump, false = shutup
}
diff --git a/src/libs/client/PluginModel.cpp b/src/libs/client/PluginModel.cpp
index df8d4bf7..1f11cc21 100644
--- a/src/libs/client/PluginModel.cpp
+++ b/src/libs/client/PluginModel.cpp
@@ -57,6 +57,7 @@ PluginModel::default_node_name(SharedPtr<PatchModel> parent)
}
+#if 0
struct NodeController {
EngineInterface* engine;
NodeModel* node;
@@ -91,6 +92,7 @@ lv2_ui_write(LV2UI_Controller controller,
nc->engine->set_port_value_immediate(port->path(),
port->type().uri(), buffer_size, buffer);
}
+#endif
#ifdef HAVE_SLV2
diff --git a/src/libs/client/PluginUI.cpp b/src/libs/client/PluginUI.cpp
index b9ef9050..54ee0009 100644
--- a/src/libs/client/PluginUI.cpp
+++ b/src/libs/client/PluginUI.cpp
@@ -30,11 +30,11 @@ static void
lv2_ui_write(LV2UI_Controller controller,
uint32_t port_index,
uint32_t buffer_size,
- uint32_t format,
+ uint32_t format,
const void* buffer)
{
- /*cerr << "********* LV2 UI WRITE:" << endl;
- lv2_osc_message_print((const LV2Message*)buffer);
+ cerr << "********* LV2 UI WRITE (FORMAT " << format << ":" << endl;
+ /*lv2_osc_message_print((const LV2Message*)buffer);*/
fprintf(stderr, "RAW:\n");
for (uint32_t i=0; i < buffer_size; ++i) {
@@ -44,18 +44,16 @@ lv2_ui_write(LV2UI_Controller controller,
else
fprintf(stderr, "%2X ", ((unsigned char*)buffer)[i]);
}
-
fprintf(stderr, "\n");
- */
PluginUI* ui = (PluginUI*)controller;
SharedPtr<PortModel> port = ui->node()->ports()[port_index];
if (format == 0) {
- ui->engine()->set_port_value_immediate(port->path(),
- port->type().uri(),
- buffer_size, buffer);
+ ui->engine()->set_port_value_immediate(port->path(),
+ port->type().uri(),
+ buffer_size, buffer);
}
}
@@ -73,7 +71,7 @@ PluginUI::~PluginUI()
{
slv2_ui_instance_free(_instance);
}
-
+
SharedPtr<PluginUI>
PluginUI::create(SharedPtr<EngineInterface> engine,
diff --git a/src/libs/client/PortModel.hpp b/src/libs/client/PortModel.hpp
index 940b967e..759b8c1e 100644
--- a/src/libs/client/PortModel.hpp
+++ b/src/libs/client/PortModel.hpp
@@ -56,18 +56,16 @@ public:
inline bool operator==(const PortModel& pm) const { return (_path == pm._path); }
- inline void value(float val)
+ inline void value(const Atom& val)
{
if (val != _current_val) {
_current_val = val;
- signal_control.emit(val);
+ signal_value_changed.emit(val);
}
}
- inline float value() { return _current_val; }
-
// Signals
- sigc::signal<void, float> signal_control; ///< Control ports
+ sigc::signal<void, const Atom&> signal_value_changed; ///< Value ports
sigc::signal<void> signal_activity; ///< Message ports
sigc::signal<void, SharedPtr<PortModel> > signal_connection;
sigc::signal<void, SharedPtr<PortModel> > signal_disconnection;