summaryrefslogtreecommitdiffstats
path: root/src/libs
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs')
-rw-r--r--src/libs/client/OSCClientReceiver.cpp2
-rw-r--r--src/libs/engine/OSCBuffer.cpp3
-rw-r--r--src/libs/engine/OSCBuffer.hpp1
-rw-r--r--src/libs/engine/PortImpl.cpp8
4 files changed, 10 insertions, 4 deletions
diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp
index a4197797..1da99a96 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);
+ start(false);
}
diff --git a/src/libs/engine/OSCBuffer.cpp b/src/libs/engine/OSCBuffer.cpp
index d3d1c952..977d4e66 100644
--- a/src/libs/engine/OSCBuffer.cpp
+++ b/src/libs/engine/OSCBuffer.cpp
@@ -89,14 +89,13 @@ OSCBuffer::prepare_read(SampleCount nframes)
{
assert(!_joined_buf || data() == _joined_buf->data());
- reset(nframes);
+ rewind();
}
void
OSCBuffer::prepare_write(SampleCount nframes)
{
- clear();
reset(nframes);
assert(!_joined_buf || data() == _joined_buf->data());
diff --git a/src/libs/engine/OSCBuffer.hpp b/src/libs/engine/OSCBuffer.hpp
index d70474a2..9f352de3 100644
--- a/src/libs/engine/OSCBuffer.hpp
+++ b/src/libs/engine/OSCBuffer.hpp
@@ -47,6 +47,7 @@ public:
void copy(const Buffer* src, size_t start_sample, size_t end_sample);
uint32_t this_nframes() const { return _this_nframes; }
+ uint32_t event_count() const { return _buf->message_count; }
inline LV2OSCBuffer* data()
{ return ((_joined_buf != NULL) ? _joined_buf->data() : _buf); }
diff --git a/src/libs/engine/PortImpl.cpp b/src/libs/engine/PortImpl.cpp
index a6911154..7ef4a82a 100644
--- a/src/libs/engine/PortImpl.cpp
+++ b/src/libs/engine/PortImpl.cpp
@@ -23,6 +23,7 @@
#include "interface/DataType.hpp"
#include "AudioBuffer.hpp"
#include "MidiBuffer.hpp"
+#include "OSCBuffer.hpp"
#include "BufferFactory.hpp"
#include "ProcessContext.hpp"
#include "SendPortActivityEvent.hpp"
@@ -57,7 +58,7 @@ PortImpl::PortImpl(NodeImpl* const node,
if (node->parent() == NULL)
_polyphonic = false;
- if (type == DataType::MIDI)
+ if (type == DataType::MIDI || type == DataType::OSC)
_broadcast = true; // send activity blips
assert(_buffers->size() > 0);
@@ -174,6 +175,11 @@ PortImpl::broadcast(ProcessContext& context)
const SendPortActivityEvent ev(context.engine(), context.start(), this);
context.event_sink().write(sizeof(ev), &ev);
}
+ } else if (_type == DataType::OSC) {
+ if (((OSCBuffer*)(*_buffers)[0])->event_count() > 0) {
+ const SendPortActivityEvent ev(context.engine(), context.start(), this);
+ context.event_sink().write(sizeof(ev), &ev);
+ }
}
}
}