summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/libs/engine/EventBuffer.cpp3
-rw-r--r--src/libs/gui/NodeModule.cpp14
2 files changed, 11 insertions, 6 deletions
diff --git a/src/libs/engine/EventBuffer.cpp b/src/libs/engine/EventBuffer.cpp
index 73722ee9..e8584597 100644
--- a/src/libs/engine/EventBuffer.cpp
+++ b/src/libs/engine/EventBuffer.cpp
@@ -181,7 +181,7 @@ EventBuffer::append(uint32_t frames,
/*cout << "Appending event type " << type << ", size " << size
<< " @ " << frames << "." << subframes << endl;*/
- bool ret = lv2_event_write(&_iter, frames, subframes, type, size, data);
+ const bool ret = lv2_event_write(&_iter, frames, subframes, type, size, data);
if (!ret)
cerr << "ERROR: Failed to write event." << endl;
@@ -219,7 +219,6 @@ EventBuffer::append(const LV2_Event_Buffer* buf)
if (!(ret = append(ev->frames, ev->subframes, ev->type, ev->size, *data))) {
cerr << "ERROR: Failed to write event." << endl;
break;
- } else {
}
_latest_frames = ev->frames;
diff --git a/src/libs/gui/NodeModule.cpp b/src/libs/gui/NodeModule.cpp
index b3898b94..fc6b13de 100644
--- a/src/libs/gui/NodeModule.cpp
+++ b/src/libs/gui/NodeModule.cpp
@@ -104,8 +104,10 @@ NodeModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> n
void
NodeModule::value_changed(uint32_t index, const Atom& value)
{
- if (value.type() == Atom::FLOAT) {
- float control = value.get_float();
+ float control = 0.0f;
+ switch (value.type()) {
+ case Atom::FLOAT:
+ control = value.get_float();
if (_plugin_ui) {
SLV2UIInstance inst = _plugin_ui->instance();
const LV2UI_Descriptor* ui_descriptor = slv2_ui_instance_get_descriptor(inst);
@@ -113,8 +115,12 @@ NodeModule::value_changed(uint32_t index, const Atom& value)
if (ui_descriptor->port_event)
ui_descriptor->port_event(ui_handle, index, 4, 0, &control);
}
- } else {
- cerr << "WARNING: Unknown value type " << (int)value.type() << endl;
+ break;
+ case Atom::STRING:
+ cout << "Port value type is a string? (\"" << value.get_string() << "\")" << endl;
+ break;
+ default:
+ break;
}
}