diff options
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/OSCEngineSender.cpp | 6 | ||||
-rw-r--r-- | src/client/OSCEngineSender.hpp | 16 | ||||
-rw-r--r-- | src/client/ingen_client.cpp | 3 |
3 files changed, 18 insertions, 7 deletions
diff --git a/src/client/OSCEngineSender.cpp b/src/client/OSCEngineSender.cpp index d2125e08..f78583f9 100644 --- a/src/client/OSCEngineSender.cpp +++ b/src/client/OSCEngineSender.cpp @@ -37,8 +37,10 @@ namespace Client { * from the most recently created server, so create the OSC listener before * this to have it all happen on the same port. Yeah, this is a big magic :/ */ -OSCEngineSender::OSCEngineSender(const URI& engine_url) - : _engine_url(engine_url) +OSCEngineSender::OSCEngineSender(const URI& engine_url, + size_t max_packet_size) + : Shared::OSCSender(max_packet_size) + , _engine_url(engine_url) , _id(0) { _address = lo_address_new_from_url(engine_url.c_str()); diff --git a/src/client/OSCEngineSender.hpp b/src/client/OSCEngineSender.hpp index e5a2fc9f..30e82c5f 100644 --- a/src/client/OSCEngineSender.hpp +++ b/src/client/OSCEngineSender.hpp @@ -18,13 +18,18 @@ #ifndef INGEN_CLIENT_OSCENGINESENDER_HPP #define INGEN_CLIENT_OSCENGINESENDER_HPP -#include <inttypes.h> +#include <stdbool.h> +#include <stddef.h> + #include <string> + #include <lo/lo.h> + #include "ingen/EngineInterface.hpp" #include "shared/OSCSender.hpp" namespace Ingen { + namespace Client { /* OSC (via liblo) interface to the engine. @@ -36,11 +41,14 @@ namespace Client { */ class OSCEngineSender : public EngineInterface, public Shared::OSCSender { public: - OSCEngineSender(const Raul::URI& engine_url); + OSCEngineSender(const Raul::URI& engine_url, + size_t max_packet_size); + ~OSCEngineSender(); - static OSCEngineSender* create(const Raul::URI& engine_url) { - return new OSCEngineSender(engine_url); + static OSCEngineSender* create(const Raul::URI& engine_url, + size_t max_packet_size) { + return new OSCEngineSender(engine_url, max_packet_size); } Raul::URI uri() const { return _engine_url; } diff --git a/src/client/ingen_client.cpp b/src/client/ingen_client.cpp index f1aa5c11..93b00e59 100644 --- a/src/client/ingen_client.cpp +++ b/src/client/ingen_client.cpp @@ -32,7 +32,8 @@ using namespace Ingen; SharedPtr<Ingen::EngineInterface> new_osc_interface(Ingen::Shared::World* world, const std::string& url) { - Client::OSCEngineSender* oes = Client::OSCEngineSender::create(url); + Client::OSCEngineSender* oes = Client::OSCEngineSender::create( + url, world->conf()->option("packet-size").get_int32()); oes->attach(rand(), true); return SharedPtr<EngineInterface>(oes); } |