diff options
author | David Robillard <d@drobilla.net> | 2007-10-09 03:45:24 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2007-10-09 03:45:24 +0000 |
commit | b98fd4bc7b8548cc2be538a91ce799fabbd3054f (patch) | |
tree | 1b48099e550d83eb138d886f3bb643a90071f5f0 /src/libs/engine/events/SetPortValueEvent.cpp | |
parent | 531cd8958765315a5340ba94487d655023acd758 (diff) | |
download | ingen-b98fd4bc7b8548cc2be538a91ce799fabbd3054f.tar.gz ingen-b98fd4bc7b8548cc2be538a91ce799fabbd3054f.tar.bz2 ingen-b98fd4bc7b8548cc2be538a91ce799fabbd3054f.zip |
Fix OSC patching.
Add OSC "bang" LV2 plugin, with GUI (just a button).
Make OSC metronome suck slightly less.
git-svn-id: http://svn.drobilla.net/lad/ingen@857 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/engine/events/SetPortValueEvent.cpp')
-rw-r--r-- | src/libs/engine/events/SetPortValueEvent.cpp | 10 |
1 files changed, 10 insertions, 0 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); } } } |