summaryrefslogtreecommitdiffstats
path: root/src/libs/engine/events
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine/events')
-rw-r--r--src/libs/engine/events/SetPortValueEvent.cpp10
-rw-r--r--src/libs/engine/events/SetPortValueEvent.hpp14
2 files changed, 17 insertions, 7 deletions
diff --git a/src/libs/engine/events/SetPortValueEvent.cpp b/src/libs/engine/events/SetPortValueEvent.cpp
index f278c083..592c09b3 100644
--- a/src/libs/engine/events/SetPortValueEvent.cpp
+++ b/src/libs/engine/events/SetPortValueEvent.cpp
@@ -16,6 +16,7 @@
*/
#include <sstream>
+#include "lv2_osc_print.h"
#include "Responder.hpp"
#include "SetPortValueEvent.hpp"
#include "Engine.hpp"
@@ -25,6 +26,7 @@
#include "ObjectStore.hpp"
#include "AudioBuffer.hpp"
#include "MidiBuffer.hpp"
+#include "OSCBuffer.hpp"
#include "ProcessContext.hpp"
using namespace std;
@@ -111,6 +113,14 @@ SetPortValueEvent::execute(ProcessContext& context)
if (mbuf) {
const double stamp = std::max((double)(_time - context.start()), mbuf->latest_stamp());
mbuf->append(stamp, _data_size, (const unsigned char*)_data);
+ return;
+ }
+
+ OSCBuffer* const obuf = dynamic_cast<OSCBuffer*>(buf);
+ if (obuf) {
+ //cerr << "Appending OSC message:" << endl;
+ //lv2_osc_message_print((LV2Message*)_data);
+ lv2_osc_buffer_append_message(obuf->data(), (LV2Message*)_data);
}
}
}
diff --git a/src/libs/engine/events/SetPortValueEvent.hpp b/src/libs/engine/events/SetPortValueEvent.hpp
index c9d46a8e..e6497aa5 100644
--- a/src/libs/engine/events/SetPortValueEvent.hpp
+++ b/src/libs/engine/events/SetPortValueEvent.hpp
@@ -58,13 +58,13 @@ public:
private:
enum ErrorType { NO_ERROR, PORT_NOT_FOUND, NO_SPACE };
- bool _omni;
- uint32_t _voice_num;
- string _port_path;
- uint32_t _data_size;
- void* _data;
- PortImpl* _port;
- ErrorType _error;
+ bool _omni;
+ uint32_t _voice_num;
+ const string _port_path;
+ uint32_t _data_size;
+ void* _data;
+ PortImpl* _port;
+ ErrorType _error;
};