summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/AudioBuffer.cpp6
-rw-r--r--src/engine/AudioBuffer.hpp6
-rw-r--r--src/engine/Buffer.hpp16
-rw-r--r--src/engine/BufferFactory.cpp13
-rw-r--r--src/engine/BufferFactory.hpp25
-rw-r--r--src/engine/ClientBroadcaster.cpp3
-rw-r--r--src/engine/ClientBroadcaster.hpp24
-rw-r--r--src/engine/CompiledPatch.hpp2
-rw-r--r--src/engine/ConnectionImpl.cpp6
-rw-r--r--src/engine/ConnectionImpl.hpp4
-rw-r--r--src/engine/Context.hpp2
-rw-r--r--src/engine/ControlBindings.cpp14
-rw-r--r--src/engine/ControlBindings.hpp2
-rw-r--r--src/engine/Driver.hpp10
-rw-r--r--src/engine/DuplexPort.cpp4
-rw-r--r--src/engine/DuplexPort.hpp8
-rw-r--r--src/engine/Engine.cpp14
-rw-r--r--src/engine/Engine.hpp39
-rw-r--r--src/engine/EngineStore.cpp4
-rw-r--r--src/engine/EngineStore.hpp9
-rw-r--r--src/engine/Event.cpp2
-rw-r--r--src/engine/Event.hpp2
-rw-r--r--src/engine/EventBuffer.cpp4
-rw-r--r--src/engine/EventBuffer.hpp6
-rw-r--r--src/engine/EventSink.cpp2
-rw-r--r--src/engine/EventSink.hpp2
-rw-r--r--src/engine/EventSource.cpp2
-rw-r--r--src/engine/EventSource.hpp2
-rw-r--r--src/engine/GraphObjectImpl.cpp11
-rw-r--r--src/engine/GraphObjectImpl.hpp10
-rw-r--r--src/engine/HTTPClientSender.cpp6
-rw-r--r--src/engine/HTTPClientSender.hpp23
-rw-r--r--src/engine/HTTPEngineReceiver.cpp4
-rw-r--r--src/engine/HTTPEngineReceiver.hpp2
-rw-r--r--src/engine/InputPort.cpp7
-rw-r--r--src/engine/InputPort.hpp4
-rw-r--r--src/engine/InternalPlugin.cpp12
-rw-r--r--src/engine/InternalPlugin.hpp4
-rw-r--r--src/engine/JackDriver.cpp6
-rw-r--r--src/engine/JackDriver.hpp4
-rw-r--r--src/engine/LV2BlobFeature.hpp6
-rw-r--r--src/engine/LV2EventFeature.hpp6
-rw-r--r--src/engine/LV2Info.cpp2
-rw-r--r--src/engine/LV2Info.hpp5
-rw-r--r--src/engine/LV2Node.cpp10
-rw-r--r--src/engine/LV2Node.hpp4
-rw-r--r--src/engine/LV2Plugin.cpp12
-rw-r--r--src/engine/LV2Plugin.hpp4
-rw-r--r--src/engine/LV2RequestRunFeature.hpp10
-rw-r--r--src/engine/LV2ResizeFeature.hpp6
-rw-r--r--src/engine/MessageContext.cpp2
-rw-r--r--src/engine/MessageContext.hpp2
-rw-r--r--src/engine/NodeFactory.cpp4
-rw-r--r--src/engine/NodeFactory.hpp2
-rw-r--r--src/engine/NodeImpl.cpp6
-rw-r--r--src/engine/NodeImpl.hpp16
-rw-r--r--src/engine/OSCClientSender.cpp26
-rw-r--r--src/engine/OSCClientSender.hpp21
-rw-r--r--src/engine/OSCEngineReceiver.cpp8
-rw-r--r--src/engine/OSCEngineReceiver.hpp2
-rw-r--r--src/engine/ObjectBuffer.cpp4
-rw-r--r--src/engine/ObjectBuffer.hpp6
-rw-r--r--src/engine/ObjectSender.cpp8
-rw-r--r--src/engine/ObjectSender.hpp27
-rw-r--r--src/engine/OutputPort.cpp5
-rw-r--r--src/engine/OutputPort.hpp4
-rw-r--r--src/engine/PatchImpl.cpp13
-rw-r--r--src/engine/PatchImpl.hpp11
-rw-r--r--src/engine/PatchPlugin.hpp6
-rw-r--r--src/engine/PluginImpl.cpp2
-rw-r--r--src/engine/PluginImpl.hpp13
-rw-r--r--src/engine/PortImpl.cpp10
-rw-r--r--src/engine/PortImpl.hpp8
-rw-r--r--src/engine/PostProcessor.cpp2
-rw-r--r--src/engine/PostProcessor.hpp2
-rw-r--r--src/engine/ProcessContext.cpp4
-rw-r--r--src/engine/ProcessContext.hpp2
-rw-r--r--src/engine/ProcessSlave.cpp2
-rw-r--r--src/engine/ProcessSlave.hpp2
-rw-r--r--src/engine/QueuedEngineInterface.cpp16
-rw-r--r--src/engine/QueuedEngineInterface.hpp24
-rw-r--r--src/engine/QueuedEvent.cpp2
-rw-r--r--src/engine/QueuedEvent.hpp2
-rw-r--r--src/engine/Request.hpp16
-rw-r--r--src/engine/ThreadManager.hpp2
-rw-r--r--src/engine/events/Connect.cpp4
-rw-r--r--src/engine/events/Connect.hpp2
-rw-r--r--src/engine/events/CreateNode.cpp4
-rw-r--r--src/engine/events/CreateNode.hpp16
-rw-r--r--src/engine/events/CreatePatch.cpp6
-rw-r--r--src/engine/events/CreatePatch.hpp16
-rw-r--r--src/engine/events/CreatePort.cpp10
-rw-r--r--src/engine/events/CreatePort.hpp20
-rw-r--r--src/engine/events/Deactivate.hpp2
-rw-r--r--src/engine/events/Delete.cpp4
-rw-r--r--src/engine/events/Delete.hpp4
-rw-r--r--src/engine/events/Disconnect.cpp2
-rw-r--r--src/engine/events/Disconnect.hpp4
-rw-r--r--src/engine/events/DisconnectAll.cpp2
-rw-r--r--src/engine/events/DisconnectAll.hpp2
-rw-r--r--src/engine/events/Get.cpp2
-rw-r--r--src/engine/events/Get.hpp2
-rw-r--r--src/engine/events/LoadPlugins.cpp2
-rw-r--r--src/engine/events/LoadPlugins.hpp2
-rw-r--r--src/engine/events/Move.cpp8
-rw-r--r--src/engine/events/Move.hpp2
-rw-r--r--src/engine/events/Ping.hpp2
-rw-r--r--src/engine/events/RegisterClient.cpp12
-rw-r--r--src/engine/events/RegisterClient.hpp16
-rw-r--r--src/engine/events/RequestMetadata.cpp8
-rw-r--r--src/engine/events/RequestMetadata.hpp29
-rw-r--r--src/engine/events/SendBinding.cpp4
-rw-r--r--src/engine/events/SendBinding.hpp2
-rw-r--r--src/engine/events/SendPortActivity.cpp2
-rw-r--r--src/engine/events/SendPortActivity.hpp2
-rw-r--r--src/engine/events/SendPortValue.cpp2
-rw-r--r--src/engine/events/SendPortValue.hpp2
-rw-r--r--src/engine/events/SetMetadata.cpp13
-rw-r--r--src/engine/events/SetMetadata.hpp26
-rw-r--r--src/engine/events/SetPortValue.cpp8
-rw-r--r--src/engine/events/SetPortValue.hpp2
-rw-r--r--src/engine/events/UnregisterClient.cpp2
-rw-r--r--src/engine/events/UnregisterClient.hpp2
-rw-r--r--src/engine/ingen_engine.cpp9
-rw-r--r--src/engine/ingen_jack.cpp7
-rw-r--r--src/engine/ingen_lv2.cpp67
-rw-r--r--src/engine/ingen_osc.cpp13
-rw-r--r--src/engine/internals/Controller.cpp6
-rw-r--r--src/engine/internals/Controller.hpp2
-rw-r--r--src/engine/internals/Delay.cpp6
-rw-r--r--src/engine/internals/Delay.hpp2
-rw-r--r--src/engine/internals/Note.cpp6
-rw-r--r--src/engine/internals/Note.hpp2
-rw-r--r--src/engine/internals/Trigger.cpp6
-rw-r--r--src/engine/internals/Trigger.hpp2
-rw-r--r--src/engine/mix.hpp4
-rw-r--r--src/engine/tuning.hpp2
-rw-r--r--src/engine/util.hpp2
138 files changed, 658 insertions, 401 deletions
diff --git a/src/engine/AudioBuffer.cpp b/src/engine/AudioBuffer.cpp
index 3a818e6f..172e41ac 100644
--- a/src/engine/AudioBuffer.cpp
+++ b/src/engine/AudioBuffer.cpp
@@ -32,10 +32,9 @@ using namespace Raul;
* stops sucking. Probably a good idea to inline them as well */
namespace Ingen {
+namespace Engine {
-using namespace Shared;
-
-AudioBuffer::AudioBuffer(BufferFactory& bufs, Shared::PortType type, size_t size)
+AudioBuffer::AudioBuffer(BufferFactory& bufs, PortType type, size_t size)
: ObjectBuffer(bufs, size)
, _state(OK)
, _set_value(0)
@@ -204,4 +203,5 @@ AudioBuffer::prepare_read(Context& context)
}
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/AudioBuffer.hpp b/src/engine/AudioBuffer.hpp
index 9bf356ee..d0c562a9 100644
--- a/src/engine/AudioBuffer.hpp
+++ b/src/engine/AudioBuffer.hpp
@@ -28,11 +28,12 @@
using namespace std;
namespace Ingen {
+namespace Engine {
class AudioBuffer : public ObjectBuffer
{
public:
- AudioBuffer(BufferFactory& bufs, Shared::PortType type, size_t capacity);
+ AudioBuffer(BufferFactory& bufs, PortType type, size_t capacity);
void clear();
@@ -42,7 +43,7 @@ public:
void copy(Context& context, const Buffer* src);
void accumulate(Context& context, const AudioBuffer* src);
- inline bool is_control() const { return _type.symbol() == Shared::PortType::CONTROL; }
+ inline bool is_control() const { return _type.symbol() == PortType::CONTROL; }
inline Sample* data() const {
return (is_control())
@@ -102,6 +103,7 @@ AudioBuffer::accumulate(Context& context, const AudioBuffer* const src)
}
}
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_AUDIOBUFFER_HPP
diff --git a/src/engine/Buffer.hpp b/src/engine/Buffer.hpp
index e4ac8fb0..6449d885 100644
--- a/src/engine/Buffer.hpp
+++ b/src/engine/Buffer.hpp
@@ -29,6 +29,7 @@
#include "BufferFactory.hpp"
namespace Ingen {
+namespace Engine {
class Context;
class Engine;
@@ -37,7 +38,7 @@ class BufferFactory;
class Buffer : public boost::noncopyable, public Raul::Deletable
{
public:
- Buffer(BufferFactory& bufs, Shared::PortType type, size_t size)
+ Buffer(BufferFactory& bufs, PortType type, size_t size)
: _factory(bufs)
, _type(type)
, _size(size)
@@ -50,8 +51,8 @@ public:
virtual void resize(size_t size) { _size = size; }
- virtual void* port_data(Shared::PortType port_type, SampleCount offset=0) = 0;
- virtual const void* port_data(Shared::PortType port_type, SampleCount offset=0) const = 0;
+ virtual void* port_data(PortType port_type, SampleCount offset=0) = 0;
+ virtual const void* port_data(PortType port_type, SampleCount offset=0) const = 0;
/** Rewind (ie reset read pointer), but leave contents unchanged */
virtual void rewind() const {}
@@ -61,7 +62,7 @@ public:
virtual void prepare_read(Context& context) {}
virtual void prepare_write(Context& context) {}
- Shared::PortType type() const { return _type; }
+ PortType type() const { return _type; }
size_t size() const { return _size; }
inline void ref() { ++_refs; }
@@ -74,7 +75,7 @@ public:
protected:
BufferFactory& _factory;
- Shared::PortType _type;
+ PortType _type;
size_t _size;
friend class BufferFactory;
@@ -85,11 +86,12 @@ private:
size_t _refs; ///< Intrusive reference count for intrusive_ptr
};
+} // namespace Engine
} // namespace Ingen
namespace boost {
- inline void intrusive_ptr_add_ref(Ingen::Buffer* b) { b->ref(); }
- inline void intrusive_ptr_release(Ingen::Buffer* b) { b->deref(); }
+inline void intrusive_ptr_add_ref(Ingen::Engine::Buffer* b) { b->ref(); }
+inline void intrusive_ptr_release(Ingen::Engine::Buffer* b) { b->deref(); }
}
#endif // INGEN_ENGINE_BUFFER_HPP
diff --git a/src/engine/BufferFactory.cpp b/src/engine/BufferFactory.cpp
index 33b2a571..9eb51b54 100644
--- a/src/engine/BufferFactory.cpp
+++ b/src/engine/BufferFactory.cpp
@@ -29,12 +29,12 @@
using namespace Raul;
namespace Ingen {
+namespace Engine {
-using namespace Shared;
-
-BufferFactory::BufferFactory(Engine& engine, SharedPtr<Shared::LV2URIMap> a_uris)
+BufferFactory::BufferFactory(Engine& engine,
+ SharedPtr<Ingen::Shared::LV2URIMap> uris)
: _engine(engine)
- , _uris(a_uris)
+ , _uris(uris)
, _silent_buffer(NULL)
{
assert(_uris);
@@ -85,7 +85,7 @@ BufferFactory::default_buffer_size(PortType type)
}
BufferFactory::Ref
-BufferFactory::get(Shared::PortType type, size_t size, bool force_create)
+BufferFactory::get(PortType type, size_t size, bool force_create)
{
Raul::AtomicPtr<Buffer>& head_ptr = free_list(type);
Buffer* try_head = NULL;
@@ -115,7 +115,7 @@ BufferFactory::get(Shared::PortType type, size_t size, bool force_create)
}
BufferFactory::Ref
-BufferFactory::create(Shared::PortType type, size_t size)
+BufferFactory::create(PortType type, size_t size)
{
ThreadManager::assert_not_thread(THREAD_PROCESS);
@@ -157,4 +157,5 @@ BufferFactory::recycle(Buffer* buf)
} while (!head_ptr.compare_and_exchange(try_head, buf));
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/BufferFactory.hpp b/src/engine/BufferFactory.hpp
index 8a2c9207..5d6ebf7c 100644
--- a/src/engine/BufferFactory.hpp
+++ b/src/engine/BufferFactory.hpp
@@ -28,16 +28,18 @@
namespace Ingen {
-using namespace Shared;
+namespace Shared { class LV2URIMap; }
+
+namespace Engine {
class Engine;
class Buffer;
-namespace Shared { class LV2URIMap; }
-
class BufferFactory {
public:
- BufferFactory(Engine& engine, SharedPtr<Shared::LV2URIMap> uris);
+ BufferFactory(Engine& engine,
+ SharedPtr<Ingen::Shared::LV2URIMap> uris);
+
~BufferFactory();
typedef boost::intrusive_ptr<Buffer> Ref;
@@ -45,21 +47,21 @@ public:
static size_t audio_buffer_size(SampleCount nframes);
size_t default_buffer_size(PortType type);
- Ref get(Shared::PortType type, size_t size=0, bool force_create=false);
+ Ref get(PortType type, size_t size=0, bool force_create=false);
Ref silent_buffer() { return _silent_buffer; }
void set_block_length(SampleCount block_length);
- Shared::LV2URIMap& uris() { assert(_uris); return *_uris.get(); }
+ Ingen::Shared::LV2URIMap& uris() { assert(_uris); return *_uris.get(); }
private:
friend class Buffer;
void recycle(Buffer* buf);
- Ref create(Shared::PortType type, size_t size=0);
+ Ref create(PortType type, size_t size=0);
- inline Raul::AtomicPtr<Buffer>& free_list(Shared::PortType type) {
+ inline Raul::AtomicPtr<Buffer>& free_list(PortType type) {
switch (type.symbol()) {
case PortType::AUDIO: return _free_audio;
case PortType::CONTROL: return _free_control;
@@ -77,13 +79,14 @@ private:
Raul::AtomicPtr<Buffer> _free_event;
Raul::AtomicPtr<Buffer> _free_object;
- Glib::Mutex _mutex;
- Engine& _engine;
- SharedPtr<Shared::LV2URIMap> _uris;
+ Glib::Mutex _mutex;
+ Engine& _engine;
+ SharedPtr<Ingen::Shared::LV2URIMap> _uris;
Ref _silent_buffer;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_BUFFERFACTORY_HPP
diff --git a/src/engine/ClientBroadcaster.cpp b/src/engine/ClientBroadcaster.cpp
index c6d731a3..85c23f3f 100644
--- a/src/engine/ClientBroadcaster.cpp
+++ b/src/engine/ClientBroadcaster.cpp
@@ -30,9 +30,9 @@
using namespace std;
using namespace Raul;
-using Ingen::Shared::ClientInterface;
namespace Ingen {
+namespace Engine {
/** Register a client to receive messages over the notification band.
*/
@@ -112,4 +112,5 @@ ClientBroadcaster::send_object(const GraphObjectImpl* o, bool recursive)
ObjectSender::send_object((*i).second, o, recursive);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/ClientBroadcaster.hpp b/src/engine/ClientBroadcaster.hpp
index 86feb716..1c77c46b 100644
--- a/src/engine/ClientBroadcaster.hpp
+++ b/src/engine/ClientBroadcaster.hpp
@@ -29,6 +29,7 @@
using namespace std;
namespace Ingen {
+namespace Engine {
class GraphObjectImpl;
class NodeImpl;
@@ -44,16 +45,16 @@ class ConnectionImpl;
*
* \ingroup engine
*/
-class ClientBroadcaster : public Shared::ClientInterface
+class ClientBroadcaster : public ClientInterface
{
public:
- void register_client(const Raul::URI& uri, Shared::ClientInterface* client);
+ void register_client(const Raul::URI& uri, ClientInterface* client);
bool unregister_client(const Raul::URI& uri);
- Shared::ClientInterface* client(const Raul::URI& uri);
+ ClientInterface* client(const Raul::URI& uri);
void send_plugins(const NodeFactory::Plugins& plugin_list);
- void send_plugins_to(Shared::ClientInterface*, const NodeFactory::Plugins& plugin_list);
+ void send_plugins_to(ClientInterface*, const NodeFactory::Plugins& plugin_list);
void send_object(const GraphObjectImpl* p, bool recursive);
@@ -66,15 +67,15 @@ public:
void bundle_begin() { BROADCAST(bundle_begin); }
void bundle_end() { BROADCAST(bundle_end); }
- void put(const Raul::URI& uri,
- const Shared::Resource::Properties& properties,
- Shared::Resource::Graph ctx=Shared::Resource::DEFAULT) {
+ void put(const Raul::URI& uri,
+ const Resource::Properties& properties,
+ Resource::Graph ctx=Resource::DEFAULT) {
BROADCAST(put, uri, properties);
}
- void delta(const Raul::URI& uri,
- const Shared::Resource::Properties& remove,
- const Shared::Resource::Properties& add) {
+ void delta(const Raul::URI& uri,
+ const Resource::Properties& remove,
+ const Resource::Properties& add) {
BROADCAST(delta, uri, remove, add);
}
@@ -116,10 +117,11 @@ public:
void activity(const Raul::Path& path) { BROADCAST(activity, path); }
private:
- typedef std::map<Raul::URI, Shared::ClientInterface*> Clients;
+ typedef std::map<Raul::URI, ClientInterface*> Clients;
Clients _clients;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_CLIENTBROADCASTER_HPP
diff --git a/src/engine/CompiledPatch.hpp b/src/engine/CompiledPatch.hpp
index ebfa8cb3..274816fb 100644
--- a/src/engine/CompiledPatch.hpp
+++ b/src/engine/CompiledPatch.hpp
@@ -24,6 +24,7 @@
#include <boost/utility.hpp>
namespace Ingen {
+namespace Engine {
class ConnectionImpl;
@@ -69,6 +70,7 @@ struct CompiledPatch : public std::vector<CompiledNode>
std::vector<ConnectionImpl*> queued_connections;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_COMPILEDPATCH_HPP
diff --git a/src/engine/ConnectionImpl.cpp b/src/engine/ConnectionImpl.cpp
index 316a4923..90ac75ea 100644
--- a/src/engine/ConnectionImpl.cpp
+++ b/src/engine/ConnectionImpl.cpp
@@ -34,8 +34,7 @@
#include "util.hpp"
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
/** Constructor for a connection from a node's output port.
*
@@ -122,7 +121,7 @@ ConnectionImpl::queue(Context& context)
bool
ConnectionImpl::can_connect(const OutputPort* src, const InputPort* dst)
{
- const LV2URIMap& uris = src->bufs().uris();
+ const Ingen::Shared::LV2URIMap& uris = src->bufs().uris();
return (
// (Audio | Control) => (Audio | Control)
( (src->is_a(PortType::CONTROL) || src->is_a(PortType::AUDIO))
@@ -149,5 +148,6 @@ ConnectionImpl::can_connect(const OutputPort* src, const InputPort* dst)
|| (src->supports(uris.atom_Vector) && dst->is_a(PortType::AUDIO)));
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/ConnectionImpl.hpp b/src/engine/ConnectionImpl.hpp
index 231263d5..d28196fc 100644
--- a/src/engine/ConnectionImpl.hpp
+++ b/src/engine/ConnectionImpl.hpp
@@ -31,6 +31,7 @@
using namespace std;
namespace Ingen {
+namespace Engine {
class PortImpl;
class OutputPort;
@@ -48,7 +49,7 @@ class BufferFactory;
*
* \ingroup engine
*/
-class ConnectionImpl : public Raul::Deletable, public Shared::Connection
+class ConnectionImpl : public Raul::Deletable, public Connection
{
public:
ConnectionImpl(BufferFactory& bufs, PortImpl* src_port, PortImpl* dst_port);
@@ -103,6 +104,7 @@ protected:
bool _pending_disconnection;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_CONNECTIONIMPL_HPP
diff --git a/src/engine/Context.hpp b/src/engine/Context.hpp
index bb49fa58..8ef99f1d 100644
--- a/src/engine/Context.hpp
+++ b/src/engine/Context.hpp
@@ -23,6 +23,7 @@
#include "types.hpp"
namespace Ingen {
+namespace Engine {
class Engine;
@@ -97,6 +98,7 @@ protected:
bool _realtime; ///< True iff context is hard realtime
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_CONTEXT_HPP
diff --git a/src/engine/ControlBindings.cpp b/src/engine/ControlBindings.cpp
index 44aefb40..6c5b2f95 100644
--- a/src/engine/ControlBindings.cpp
+++ b/src/engine/ControlBindings.cpp
@@ -36,6 +36,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
ControlBindings::ControlBindings(Engine& engine)
: _engine(engine)
@@ -53,7 +54,7 @@ ControlBindings::~ControlBindings()
ControlBindings::Key
ControlBindings::port_binding(PortImpl* port)
{
- const Shared::LV2URIMap& uris = *_engine.world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
const Raul::Atom& binding = port->get_property(uris.ingen_controlBinding);
Key key;
if (binding.type() == Atom::DICT) {
@@ -109,7 +110,7 @@ ControlBindings::port_binding_changed(ProcessContext& context, PortImpl* port)
void
ControlBindings::port_value_changed(ProcessContext& context, PortImpl* port)
{
- const Shared::LV2URIMap& uris = *_engine.world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
Key key = port_binding(port);
if (key) {
int16_t value = port_value_to_control(port, key.type);
@@ -163,7 +164,7 @@ ControlBindings::learn(PortImpl* port)
Raul::Atom
ControlBindings::control_to_port_value(PortImpl* port, Type type, int16_t value)
{
- const Shared::LV2URIMap& uris = *_engine.world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
// TODO: cache these to avoid the lookup
float min = port->get_property(uris.lv2_minimum).get_float();
@@ -199,7 +200,7 @@ ControlBindings::port_value_to_control(PortImpl* port, Type type)
if (port->value().type() != Atom::FLOAT)
return 0;
- const Shared::LV2URIMap& uris = *_engine.world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
// TODO: cache these to avoid the lookup
float min = port->get_property(uris.lv2_minimum).get_float();
@@ -253,7 +254,7 @@ ControlBindings::set_port_value(ProcessContext& context, PortImpl* port, Type ty
bool
ControlBindings::bind(ProcessContext& context, Key key)
{
- const Shared::LV2URIMap& uris = *context.engine().world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *context.engine().world()->uris().get();
assert(_learn_port);
if (key.type == MIDI_NOTE) {
bool toggled = _learn_port->has_property(uris.lv2_portProperty, uris.lv2_toggled);
@@ -327,7 +328,7 @@ ControlBindings::pre_process(ProcessContext& context, EventBuffer* buffer)
SharedPtr<Bindings> bindings = _bindings;
_feedback->clear();
- const Shared::LV2URIMap& uris = *context.engine().world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *context.engine().world()->uris().get();
// TODO: cache
const uint32_t midi_event_type = uris.global_to_event(uris.midi_MidiEvent.id).second;
@@ -379,4 +380,5 @@ ControlBindings::post_process(ProcessContext& context, EventBuffer* buffer)
}
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/ControlBindings.hpp b/src/engine/ControlBindings.hpp
index e2d2d596..2b2946ec 100644
--- a/src/engine/ControlBindings.hpp
+++ b/src/engine/ControlBindings.hpp
@@ -26,6 +26,7 @@
#include "BufferFactory.hpp"
namespace Ingen {
+namespace Engine {
class Engine;
class ProcessContext;
@@ -95,6 +96,7 @@ private:
EventBuffer* _feedback;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_CONTROLBINDINGS_HPP
diff --git a/src/engine/Driver.hpp b/src/engine/Driver.hpp
index 3b869046..f47f2b44 100644
--- a/src/engine/Driver.hpp
+++ b/src/engine/Driver.hpp
@@ -28,6 +28,7 @@
namespace Raul { class Path; }
namespace Ingen {
+namespace Engine {
class DuplexPort;
class ProcessContext;
@@ -92,12 +93,12 @@ public:
virtual void add_port(DriverPort* port) = 0;
/** Remove a system visible port. */
- virtual Raul::Deletable* remove_port(const Raul::Path& path,
- Ingen::DriverPort** port=NULL) = 0;
+ virtual Raul::Deletable* remove_port(const Raul::Path& path,
+ DriverPort** port=NULL) = 0;
/** Return true iff this driver supports the given type of I/O */
- virtual bool supports(Shared::PortType port_type,
- Shared::EventType event_type) = 0;
+ virtual bool supports(PortType port_type,
+ EventType event_type) = 0;
virtual void set_root_patch(PatchImpl* patch) = 0;
virtual PatchImpl* root_patch() = 0;
@@ -116,6 +117,7 @@ public:
virtual ProcessContext& context() = 0;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_DRIVER_HPP
diff --git a/src/engine/DuplexPort.cpp b/src/engine/DuplexPort.cpp
index 869147bd..ecd8da27 100644
--- a/src/engine/DuplexPort.cpp
+++ b/src/engine/DuplexPort.cpp
@@ -32,8 +32,7 @@
using namespace std;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
DuplexPort::DuplexPort(
BufferFactory& bufs,
@@ -95,5 +94,6 @@ DuplexPort::post_process(Context& context)
}
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/DuplexPort.hpp b/src/engine/DuplexPort.hpp
index 416c4099..4341c6e3 100644
--- a/src/engine/DuplexPort.hpp
+++ b/src/engine/DuplexPort.hpp
@@ -24,6 +24,7 @@
#include "OutputPort.hpp"
namespace Ingen {
+namespace Engine {
class NodeImpl;
@@ -44,7 +45,7 @@ public:
uint32_t index,
bool polyphonic,
uint32_t poly,
- Shared::PortType type,
+ PortType type,
const Raul::Atom& value,
size_t buffer_size,
bool is_output);
@@ -53,8 +54,8 @@ public:
bool get_buffers(BufferFactory& bufs, Raul::Array<BufferFactory::Ref>* buffers, uint32_t poly);
- void pre_process(Ingen::Context& context);
- void post_process(Ingen::Context& context);
+ void pre_process(Context& context);
+ void post_process(Context& context);
bool is_input() const { return !_is_output; }
bool is_output() const { return _is_output; }
@@ -63,6 +64,7 @@ protected:
bool _is_output;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_DUPLEXPORT_HPP
diff --git a/src/engine/Engine.cpp b/src/engine/Engine.cpp
index 8585b5a3..72f04f69 100644
--- a/src/engine/Engine.cpp
+++ b/src/engine/Engine.cpp
@@ -51,8 +51,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
bool ThreadManager::single_threaded = true;
@@ -69,7 +68,7 @@ Engine::Engine(Ingen::Shared::World* a_world)
if (a_world->store()) {
assert(PtrCast<EngineStore>(a_world->store()));
} else {
- a_world->set_store(SharedPtr<Shared::Store>(new EngineStore()));
+ a_world->set_store(SharedPtr<Ingen::Shared::Store>(new EngineStore()));
}
}
@@ -145,7 +144,7 @@ Engine::activate()
for (EventSources::iterator i = _event_sources.begin(); i != _event_sources.end(); ++i)
(*i)->activate_source();
- const LV2URIMap& uris = *world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *world()->uris().get();
// Create root patch
PatchImpl* root_patch = _driver->root_patch();
@@ -163,12 +162,12 @@ Engine::activate()
ProcessContext context(*this);
- Shared::Resource::Properties control_properties;
+ Resource::Properties control_properties;
control_properties.insert(make_pair(uris.lv2_name, "Control"));
control_properties.insert(make_pair(uris.rdf_type, uris.ev_EventPort));
// Add control input
- Shared::Resource::Properties in_properties(control_properties);
+ Resource::Properties in_properties(control_properties);
in_properties.insert(make_pair(uris.rdf_type, uris.lv2_InputPort));
in_properties.insert(make_pair(uris.lv2_index, 0));
in_properties.insert(make_pair(uris.ingenui_canvas_x,
@@ -181,7 +180,7 @@ Engine::activate()
"/control_in", uris.ev_EventPort, false, in_properties));
// Add control out
- Shared::Resource::Properties out_properties(control_properties);
+ Resource::Properties out_properties(control_properties);
out_properties.insert(make_pair(uris.rdf_type, uris.lv2_OutputPort));
out_properties.insert(make_pair(uris.lv2_index, 1));
out_properties.insert(make_pair(uris.ingenui_canvas_x,
@@ -223,4 +222,5 @@ Engine::process_events(ProcessContext& context)
(*i)->process(*_post_processor, context);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/Engine.hpp b/src/engine/Engine.hpp
index 513d82be..af8bc48f 100644
--- a/src/engine/Engine.hpp
+++ b/src/engine/Engine.hpp
@@ -33,6 +33,8 @@ namespace Ingen {
namespace Shared { class World; }
+namespace Engine {
+
class BufferFactory;
class ClientBroadcaster;
class ControlBindings;
@@ -74,28 +76,28 @@ public:
void process_events(ProcessContext& context);
- ClientBroadcaster* broadcaster() const { return _broadcaster; }
- BufferFactory* buffer_factory() const { return _buffer_factory; }
- ControlBindings* control_bindings() const { return _control_bindings; }
- Driver* driver() const { return _driver.get(); }
- Raul::Maid* maid() const { return _maid; }
- MessageContext* message_context() const { return _message_context; }
- NodeFactory* node_factory() const { return _node_factory; }
- PostProcessor* post_processor() const { return _post_processor; }
- Shared::World* world() const { return _world; }
+ ClientBroadcaster* broadcaster() const { return _broadcaster; }
+ BufferFactory* buffer_factory() const { return _buffer_factory; }
+ ControlBindings* control_bindings() const { return _control_bindings; }
+ Driver* driver() const { return _driver.get(); }
+ Raul::Maid* maid() const { return _maid; }
+ MessageContext* message_context() const { return _message_context; }
+ NodeFactory* node_factory() const { return _node_factory; }
+ PostProcessor* post_processor() const { return _post_processor; }
+ Ingen::Shared::World* world() const { return _world; }
SharedPtr<EngineStore> engine_store() const;
private:
- ClientBroadcaster* _broadcaster;
- BufferFactory* _buffer_factory;
- ControlBindings* _control_bindings;
- SharedPtr<Driver> _driver;
- Raul::Maid* _maid;
- MessageContext* _message_context;
- NodeFactory* _node_factory;
- PostProcessor* _post_processor;
- Shared::World* _world;
+ ClientBroadcaster* _broadcaster;
+ BufferFactory* _buffer_factory;
+ ControlBindings* _control_bindings;
+ SharedPtr<Driver> _driver;
+ Raul::Maid* _maid;
+ MessageContext* _message_context;
+ NodeFactory* _node_factory;
+ PostProcessor* _post_processor;
+ Ingen::Shared::World* _world;
typedef std::set< SharedPtr<EventSource> > EventSources;
EventSources _event_sources;
@@ -103,6 +105,7 @@ private:
bool _quit_flag;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_ENGINE_HPP
diff --git a/src/engine/EngineStore.cpp b/src/engine/EngineStore.cpp
index e6066bb6..010edbc0 100644
--- a/src/engine/EngineStore.cpp
+++ b/src/engine/EngineStore.cpp
@@ -33,6 +33,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
/** Find the Patch at the given path.
*/
@@ -73,7 +74,7 @@ EngineStore::find_object(const Path& path)
/** Add an object to the store. Not realtime safe.
*/
void
-EngineStore::add(Shared::GraphObject* obj)
+EngineStore::add(GraphObject* obj)
{
ThreadManager::assert_thread(THREAD_PRE_PROCESS);
Store::add(obj);
@@ -155,4 +156,5 @@ EngineStore::remove_children(iterator object)
return SharedPtr<EngineStore::Objects>();
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/EngineStore.hpp b/src/engine/EngineStore.hpp
index 0aaf7fd7..c6d1e024 100644
--- a/src/engine/EngineStore.hpp
+++ b/src/engine/EngineStore.hpp
@@ -24,7 +24,9 @@
namespace Ingen {
-namespace Shared { class GraphObject; }
+class GraphObject;
+
+namespace Engine {
class PatchImpl;
class NodeImpl;
@@ -40,7 +42,7 @@ class GraphObjectImpl;
* Searching with find*() is fast (O(log(n)) binary search on contiguous
* memory) and realtime safe, but modification (add or remove) are neither.
*/
-class EngineStore : public Shared::Store
+class EngineStore : public Ingen::Shared::Store
{
public:
PatchImpl* find_patch(const Raul::Path& path);
@@ -48,7 +50,7 @@ public:
PortImpl* find_port(const Raul::Path& path);
GraphObjectImpl* find_object(const Raul::Path& path);
- void add(Shared::GraphObject* o);
+ void add(Ingen::GraphObject* o);
void add(const Objects& family);
SharedPtr<Objects> remove(const Raul::Path& path);
@@ -57,6 +59,7 @@ public:
SharedPtr<Objects> remove_children(Objects::iterator i);
};
+} // namespace Engine
} // namespace Ingen
#endif // OBJECTSTORE
diff --git a/src/engine/Event.cpp b/src/engine/Event.cpp
index aff8a204..76af56c0 100644
--- a/src/engine/Event.cpp
+++ b/src/engine/Event.cpp
@@ -29,6 +29,7 @@
*/
namespace Ingen {
+namespace Engine {
void
Event::execute(ProcessContext& context)
@@ -50,5 +51,6 @@ Event::post_process()
ThreadManager::assert_not_thread(THREAD_PROCESS);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/Event.hpp b/src/engine/Event.hpp
index 0c7841fc..d6664683 100644
--- a/src/engine/Event.hpp
+++ b/src/engine/Event.hpp
@@ -25,6 +25,7 @@
#include "types.hpp"
namespace Ingen {
+namespace Engine {
class Engine;
class Request;
@@ -73,6 +74,7 @@ protected:
bool _executed;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_EVENT_HPP
diff --git a/src/engine/EventBuffer.cpp b/src/engine/EventBuffer.cpp
index a2cbcf17..50f938ce 100644
--- a/src/engine/EventBuffer.cpp
+++ b/src/engine/EventBuffer.cpp
@@ -28,8 +28,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
/** Allocate a new event buffer.
* \a capacity is in bytes (not number of events).
@@ -212,4 +211,5 @@ EventBuffer::append(uint32_t frames,
}
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/EventBuffer.hpp b/src/engine/EventBuffer.hpp
index bad599ff..16f5afbe 100644
--- a/src/engine/EventBuffer.hpp
+++ b/src/engine/EventBuffer.hpp
@@ -25,14 +25,15 @@
#include "Buffer.hpp"
namespace Ingen {
+namespace Engine {
class EventBuffer : public Buffer {
public:
EventBuffer(BufferFactory& bufs, size_t capacity);
~EventBuffer();
- void* port_data(Shared::PortType port_type, SampleCount offset=0) { return _data; }
- const void* port_data(Shared::PortType port_type, SampleCount offset=0) const { return _data; }
+ void* port_data(PortType port_type, SampleCount offset=0) { return _data; }
+ const void* port_data(PortType port_type, SampleCount offset=0) const { return _data; }
inline void rewind() const { lv2_event_begin(&_iter, _data); }
@@ -79,6 +80,7 @@ private:
uint32_t _latest_subframes; ///< Latest time of all events (subframes)
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_EVENTBUFFER_HPP
diff --git a/src/engine/EventSink.cpp b/src/engine/EventSink.cpp
index 4d168f7d..bf31beaa 100644
--- a/src/engine/EventSink.cpp
+++ b/src/engine/EventSink.cpp
@@ -21,6 +21,7 @@
using namespace std;
namespace Ingen {
+namespace Engine {
/** \a size is not size_t because an event will never be even remotely close
* to UINT32_MAX in size, so uint32_t saves wasted space on 64-bit.
@@ -57,4 +58,5 @@ EventSink::read(uint32_t event_buffer_size, uint8_t* event_buffer)
return false;
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/EventSink.hpp b/src/engine/EventSink.hpp
index 7887ae11..50edea77 100644
--- a/src/engine/EventSink.hpp
+++ b/src/engine/EventSink.hpp
@@ -24,6 +24,7 @@
#include "raul/RingBuffer.hpp"
namespace Ingen {
+namespace Engine {
class PortImpl;
class Engine;
@@ -51,6 +52,7 @@ private:
Raul::RingBuffer _events;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_EVENTSINK_HPP
diff --git a/src/engine/EventSource.cpp b/src/engine/EventSource.cpp
index bc346dc3..33ab94ab 100644
--- a/src/engine/EventSource.cpp
+++ b/src/engine/EventSource.cpp
@@ -25,6 +25,7 @@
using namespace std;
namespace Ingen {
+namespace Engine {
EventSource::EventSource(size_t queue_size)
: _blocking_semaphore(0)
@@ -121,5 +122,6 @@ EventSource::_whipped()
_blocking_semaphore.wait();
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/EventSource.hpp b/src/engine/EventSource.hpp
index 0801bab0..e05b3500 100644
--- a/src/engine/EventSource.hpp
+++ b/src/engine/EventSource.hpp
@@ -23,6 +23,7 @@
#include "raul/List.hpp"
namespace Ingen {
+namespace Engine {
class Event;
class QueuedEvent;
@@ -68,6 +69,7 @@ private:
Raul::Semaphore _blocking_semaphore;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_EVENTSOURCE_HPP
diff --git a/src/engine/GraphObjectImpl.cpp b/src/engine/GraphObjectImpl.cpp
index 0d62f47e..6b8e8a08 100644
--- a/src/engine/GraphObjectImpl.cpp
+++ b/src/engine/GraphObjectImpl.cpp
@@ -25,11 +25,11 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
-using namespace Shared;
-
-GraphObjectImpl::GraphObjectImpl(Shared::LV2URIMap& uris,
- GraphObjectImpl* parent, const Symbol& symbol)
+GraphObjectImpl::GraphObjectImpl(Ingen::Shared::LV2URIMap& uris,
+ GraphObjectImpl* parent,
+ const Symbol& symbol)
: ResourceImpl(uris, parent ? parent->path().child(symbol) : Raul::Path::root())
, _parent(parent)
, _path(parent ? parent->path().child(symbol) : "/")
@@ -64,9 +64,10 @@ GraphObjectImpl::parent_patch() const
}
SharedPtr<GraphObject>
-GraphObjectImpl::find_child(const string& name) const
+GraphObjectImpl::find_child(const std::string& name) const
{
throw;
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/GraphObjectImpl.hpp b/src/engine/GraphObjectImpl.hpp
index 66b38af1..88e18ff4 100644
--- a/src/engine/GraphObjectImpl.hpp
+++ b/src/engine/GraphObjectImpl.hpp
@@ -34,6 +34,8 @@ namespace Ingen {
namespace Shared { class LV2URIMap; }
+namespace Engine {
+
class PatchImpl;
class Context;
class ProcessContext;
@@ -47,7 +49,7 @@ class BufferFactory;
*
* \ingroup engine
*/
-class GraphObjectImpl : virtual public Ingen::Shared::GraphObject
+class GraphObjectImpl : virtual public GraphObject
, public Ingen::Shared::ResourceImpl
{
public:
@@ -96,14 +98,16 @@ public:
virtual bool apply_poly(Raul::Maid& maid, uint32_t poly) = 0;
protected:
- GraphObjectImpl(Shared::LV2URIMap& uris,
- GraphObjectImpl* parent, const Raul::Symbol& symbol);
+ GraphObjectImpl(Ingen::Shared::LV2URIMap& uris,
+ GraphObjectImpl* parent,
+ const Raul::Symbol& symbol);
GraphObjectImpl* _parent;
Raul::Path _path;
Raul::Symbol _symbol;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_GRAPHOBJECTIMPL_HPP
diff --git a/src/engine/HTTPClientSender.cpp b/src/engine/HTTPClientSender.cpp
index 7e6ebe7f..c9e0eaa2 100644
--- a/src/engine/HTTPClientSender.cpp
+++ b/src/engine/HTTPClientSender.cpp
@@ -29,8 +29,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
void
HTTPClientSender::response_ok(int32_t id)
@@ -52,7 +51,7 @@ HTTPClientSender::error(const std::string& msg)
void
HTTPClientSender::put(const URI& uri,
const Resource::Properties& properties,
- Shared::Resource::Graph ctx)
+ Resource::Graph ctx)
{
const string path = (uri.substr(0, 6) == "path:/") ? uri.substr(6) : uri.str();
const string full_uri = _url + "/" + path;
@@ -135,4 +134,5 @@ HTTPClientSender::move(const Path& old_path, const Path& new_path)
send_chunk(msg);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/HTTPClientSender.hpp b/src/engine/HTTPClientSender.hpp
index dfed7a13..274d54cd 100644
--- a/src/engine/HTTPClientSender.hpp
+++ b/src/engine/HTTPClientSender.hpp
@@ -27,9 +27,11 @@
namespace Ingen {
-class Engine;
+class EngineInterface;
+
+namespace Engine {
-namespace Shared { class EngineInterface; }
+class Engine;
/** Implements ClientInterface for HTTP clients.
* Sends changes as RDF deltas over an HTTP stream
@@ -38,8 +40,8 @@ namespace Shared { class EngineInterface; }
* \ingroup engine
*/
class HTTPClientSender
- : public Shared::ClientInterface
- , public Shared::HTTPSender
+ : public ClientInterface
+ , public Ingen::Shared::HTTPSender
{
public:
explicit HTTPClientSender(Engine& engine)
@@ -66,13 +68,13 @@ public:
void error(const std::string& msg);
- virtual void put(const Raul::URI& path,
- const Shared::Resource::Properties& properties,
- Shared::Resource::Graph ctx);
+ virtual void put(const Raul::URI& path,
+ const Resource::Properties& properties,
+ Resource::Graph ctx);
- virtual void delta(const Raul::URI& path,
- const Shared::Resource::Properties& remove,
- const Shared::Resource::Properties& add);
+ virtual void delta(const Raul::URI& path,
+ const Resource::Properties& remove,
+ const Resource::Properties& add);
virtual void del(const Raul::Path& path);
@@ -97,6 +99,7 @@ private:
bool _enabled;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_HTTPCLIENTSENDER_HPP
diff --git a/src/engine/HTTPEngineReceiver.cpp b/src/engine/HTTPEngineReceiver.cpp
index 2a8d1718..196a8ad6 100644
--- a/src/engine/HTTPEngineReceiver.cpp
+++ b/src/engine/HTTPEngineReceiver.cpp
@@ -46,9 +46,10 @@ using namespace Raul;
namespace Ingen {
-using namespace Shared;
using namespace Serialisation;
+namespace Engine {
+
HTTPEngineReceiver::HTTPEngineReceiver(Engine& engine, uint16_t port)
: QueuedEngineInterface(engine, 64) // FIXME
, _server(soup_server_new(SOUP_SERVER_PORT, port, NULL))
@@ -233,5 +234,6 @@ HTTPEngineReceiver::ReceiveThread::_run()
soup_server_run(_receiver._server);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/HTTPEngineReceiver.hpp b/src/engine/HTTPEngineReceiver.hpp
index 3942987a..0c6bcfd7 100644
--- a/src/engine/HTTPEngineReceiver.hpp
+++ b/src/engine/HTTPEngineReceiver.hpp
@@ -29,6 +29,7 @@ typedef struct _SoupMessage SoupMessage;
typedef struct SoupClientContext SoupClientContext;
namespace Ingen {
+namespace Engine {
class HTTPEngineReceiver : public QueuedEngineInterface
{
@@ -60,6 +61,7 @@ private:
SoupServer* _server;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_HTTPENGINERECEIVER_HPP
diff --git a/src/engine/InputPort.cpp b/src/engine/InputPort.cpp
index 7fb603b4..03855275 100644
--- a/src/engine/InputPort.cpp
+++ b/src/engine/InputPort.cpp
@@ -34,9 +34,7 @@
using namespace std;
namespace Ingen {
-
-namespace Shared { class Patch; }
-using namespace Shared;
+namespace Engine {
InputPort::InputPort(BufferFactory& bufs,
NodeImpl* parent,
@@ -49,7 +47,7 @@ InputPort::InputPort(BufferFactory& bufs,
: PortImpl(bufs, parent, symbol, index, poly, type, value, buffer_size)
, _num_connections(0)
{
- const LV2URIMap& uris = bufs.uris();
+ const Ingen::Shared::LV2URIMap& uris = bufs.uris();
if (!dynamic_cast<Patch*>(parent))
add_property(uris.rdf_type, uris.lv2_InputPort);
@@ -224,5 +222,6 @@ InputPort::direct_connect() const
&& !_connections.front()->must_queue();
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/InputPort.hpp b/src/engine/InputPort.hpp
index 77cc58cf..819ca8bf 100644
--- a/src/engine/InputPort.hpp
+++ b/src/engine/InputPort.hpp
@@ -26,6 +26,7 @@
#include "PortImpl.hpp"
namespace Ingen {
+namespace Engine {
class ConnectionImpl;
class Context;
@@ -52,7 +53,7 @@ public:
const Raul::Symbol& symbol,
uint32_t index,
uint32_t poly,
- Shared::PortType type,
+ PortType type,
const Raul::Atom& value,
size_t buffer_size=0);
@@ -84,6 +85,7 @@ protected:
Connections _connections;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_INPUTPORT_HPP
diff --git a/src/engine/InternalPlugin.cpp b/src/engine/InternalPlugin.cpp
index 346163a7..f8022e71 100644
--- a/src/engine/InternalPlugin.cpp
+++ b/src/engine/InternalPlugin.cpp
@@ -30,6 +30,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
using namespace Internals;
@@ -42,11 +43,11 @@ InternalPlugin::InternalPlugin(Shared::LV2URIMap& uris,
}
NodeImpl*
-InternalPlugin::instantiate(BufferFactory& bufs,
- const string& name,
- bool polyphonic,
- Ingen::PatchImpl* parent,
- Engine& engine)
+InternalPlugin::instantiate(BufferFactory& bufs,
+ const string& name,
+ bool polyphonic,
+ PatchImpl* parent,
+ Engine& engine)
{
assert(_type == Internal);
@@ -67,4 +68,5 @@ InternalPlugin::instantiate(BufferFactory& bufs,
}
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/InternalPlugin.hpp b/src/engine/InternalPlugin.hpp
index 53fa04ed..6301b999 100644
--- a/src/engine/InternalPlugin.hpp
+++ b/src/engine/InternalPlugin.hpp
@@ -31,6 +31,7 @@
#define NS_INTERNALS "http://drobilla.net/ns/ingen-internals#"
namespace Ingen {
+namespace Engine {
class NodeImpl;
class BufferFactory;
@@ -46,7 +47,7 @@ public:
NodeImpl* instantiate(BufferFactory& bufs,
const std::string& name,
bool polyphonic,
- Ingen::PatchImpl* parent,
+ PatchImpl* parent,
Engine& engine);
const std::string symbol() const { return _symbol; }
@@ -55,6 +56,7 @@ private:
const std::string _symbol;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_INTERNALPLUGIN_HPP
diff --git a/src/engine/JackDriver.cpp b/src/engine/JackDriver.cpp
index 9fb79461..9bb81536 100644
--- a/src/engine/JackDriver.cpp
+++ b/src/engine/JackDriver.cpp
@@ -61,6 +61,7 @@ using namespace Raul;
typedef jack_default_audio_sample_t jack_sample_t;
namespace Ingen {
+namespace Engine {
//// JackPort ////
@@ -209,7 +210,7 @@ JackDriver::~JackDriver()
}
bool
-JackDriver::supports(Shared::PortType port_type, Shared::EventType event_type)
+JackDriver::supports(PortType port_type, EventType event_type)
{
return (port_type == PortType::AUDIO
|| (port_type == PortType::EVENTS && event_type == EventType::MIDI));
@@ -357,7 +358,7 @@ JackDriver::remove_port(const Path& path, DriverPort** port)
for (Raul::List<JackPort*>::iterator i = _ports.begin(); i != _ports.end(); ++i) {
if ((*i)->patch_port()->path() == path) {
- Raul::List<Ingen::JackPort*>::Node* node = _ports.erase(i);
+ Raul::List<JackPort*>::Node* node = _ports.erase(i);
if (port)
*port = node->elem();
return node;
@@ -557,4 +558,5 @@ JackDriver::_session_cb(jack_session_event_t* event)
}
#endif
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/JackDriver.hpp b/src/engine/JackDriver.hpp
index 7e49fb1f..702692b8 100644
--- a/src/engine/JackDriver.hpp
+++ b/src/engine/JackDriver.hpp
@@ -40,6 +40,7 @@
namespace Raul { class Path; }
namespace Ingen {
+namespace Engine {
class Engine;
class PatchImpl;
@@ -86,7 +87,7 @@ public:
explicit JackDriver(Engine& engine);
~JackDriver();
- bool supports(Shared::PortType port_type, Shared::EventType event_type);
+ bool supports(PortType port_type, EventType event_type);
bool attach(const std::string& server_name,
const std::string& client_name,
@@ -176,6 +177,7 @@ private:
PatchImpl* _root_patch;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_JACKAUDIODRIVER_HPP
diff --git a/src/engine/LV2BlobFeature.hpp b/src/engine/LV2BlobFeature.hpp
index 1235e493..a23a3953 100644
--- a/src/engine/LV2BlobFeature.hpp
+++ b/src/engine/LV2BlobFeature.hpp
@@ -21,8 +21,9 @@
#include "shared/LV2Features.hpp"
namespace Ingen {
+namespace Engine {
-struct BlobFeature : public Shared::LV2Features::Feature {
+struct BlobFeature : public Ingen::Shared::LV2Features::Feature {
BlobFeature() {
LV2_Blob_Support* data = (LV2_Blob_Support*)malloc(sizeof(LV2_Blob_Support));
data->data = NULL;
@@ -51,7 +52,7 @@ struct BlobFeature : public Shared::LV2Features::Feature {
uint32_t type,
size_t size) {}
- SharedPtr<LV2_Feature> feature(Shared::World*, Shared::Node*) {
+ SharedPtr<LV2_Feature> feature(Shared::World*, Node*) {
return SharedPtr<LV2_Feature>(&_feature, NullDeleter<LV2_Feature>);
}
@@ -59,6 +60,7 @@ private:
LV2_Feature _feature;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_LV2BLOBFEATURE_HPP
diff --git a/src/engine/LV2EventFeature.hpp b/src/engine/LV2EventFeature.hpp
index 28443d27..c9ac1c32 100644
--- a/src/engine/LV2EventFeature.hpp
+++ b/src/engine/LV2EventFeature.hpp
@@ -22,8 +22,9 @@
#include "shared/LV2Features.hpp"
namespace Ingen {
+namespace Engine {
-struct EventFeature : public Shared::LV2Features::Feature {
+struct EventFeature : public Ingen::Shared::LV2Features::Feature {
EventFeature() {
LV2_Event_Feature* data = (LV2_Event_Feature*)malloc(sizeof(LV2_Event_Feature));
data->lv2_event_ref = &event_ref;
@@ -39,7 +40,7 @@ struct EventFeature : public Shared::LV2Features::Feature {
static uint32_t event_unref(LV2_Event_Callback_Data callback_data,
LV2_Event* event) { return 0; }
- SharedPtr<LV2_Feature> feature(Shared::World*, Shared::Node*) {
+ SharedPtr<LV2_Feature> feature(Shared::World*, Node*) {
return SharedPtr<LV2_Feature>(&_feature, NullDeleter<LV2_Feature>);
}
@@ -47,6 +48,7 @@ private:
LV2_Feature _feature;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_LV2EVENTFEATURE_HPP
diff --git a/src/engine/LV2Info.cpp b/src/engine/LV2Info.cpp
index ce22844c..4fd7885f 100644
--- a/src/engine/LV2Info.cpp
+++ b/src/engine/LV2Info.cpp
@@ -36,6 +36,7 @@
using namespace std;
namespace Ingen {
+namespace Engine {
LV2Info::LV2Info(Ingen::Shared::World* world)
: input_class(slv2_value_new_uri(world->slv2_world(), SLV2_PORT_CLASS_INPUT))
@@ -72,4 +73,5 @@ LV2Info::~LV2Info()
slv2_value_free(message_port_class);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/LV2Info.hpp b/src/engine/LV2Info.hpp
index a982e592..292eb012 100644
--- a/src/engine/LV2Info.hpp
+++ b/src/engine/LV2Info.hpp
@@ -30,7 +30,9 @@
namespace Ingen {
-namespace Shared { class Node; }
+class Node;
+
+namespace Engine {
/** Stuff that may need to be passed to an LV2 plugin (i.e. LV2 features).
*/
@@ -54,6 +56,7 @@ private:
Ingen::Shared::World* _world;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_LV2INFO_HPP
diff --git a/src/engine/LV2Node.cpp b/src/engine/LV2Node.cpp
index 7398d4df..ea292b97 100644
--- a/src/engine/LV2Node.cpp
+++ b/src/engine/LV2Node.cpp
@@ -40,8 +40,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
/** Partially construct a LV2Node.
*
@@ -138,9 +137,9 @@ LV2Node::apply_poly(Raul::Maid& maid, uint32_t poly)
bool
LV2Node::instantiate(BufferFactory& bufs)
{
- const LV2URIMap& uris = bufs.uris();
- SharedPtr<LV2Info> info = _lv2_plugin->lv2_info();
- SLV2Plugin plug = _lv2_plugin->slv2_plugin();
+ const Ingen::Shared::LV2URIMap& uris = bufs.uris();
+ SharedPtr<LV2Info> info = _lv2_plugin->lv2_info();
+ SLV2Plugin plug = _lv2_plugin->slv2_plugin();
uint32_t num_ports = slv2_plugin_get_num_ports(plug);
assert(num_ports > 0);
@@ -406,5 +405,6 @@ LV2Node::set_port_buffer(uint32_t voice, uint32_t port_num,
buf ? buf->port_data(_ports->at(port_num)->buffer_type(), offset) : NULL);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/LV2Node.hpp b/src/engine/LV2Node.hpp
index beaa7819..7633f4d7 100644
--- a/src/engine/LV2Node.hpp
+++ b/src/engine/LV2Node.hpp
@@ -27,6 +27,7 @@
#include "LV2Features.hpp"
namespace Ingen {
+namespace Engine {
class LV2Plugin;
@@ -71,9 +72,10 @@ protected:
LV2_Contexts_MessageContext* _message_funcs;
- SharedPtr<Shared::LV2Features::FeatureArray> _features;
+ SharedPtr<Ingen::Shared::LV2Features::FeatureArray> _features;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_LV2NODE_HPP
diff --git a/src/engine/LV2Plugin.cpp b/src/engine/LV2Plugin.cpp
index 0bea4c42..0efc3abf 100644
--- a/src/engine/LV2Plugin.cpp
+++ b/src/engine/LV2Plugin.cpp
@@ -32,6 +32,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
LV2Plugin::LV2Plugin(SharedPtr<LV2Info> lv2_info, const std::string& uri)
: PluginImpl(*lv2_info->world().uris().get(), Plugin::LV2, uri)
@@ -62,11 +63,11 @@ LV2Plugin::symbol() const
}
NodeImpl*
-LV2Plugin::instantiate(BufferFactory& bufs,
- const string& name,
- bool polyphonic,
- Ingen::PatchImpl* parent,
- Engine& engine)
+LV2Plugin::instantiate(BufferFactory& bufs,
+ const string& name,
+ bool polyphonic,
+ PatchImpl* parent,
+ Engine& engine)
{
const SampleCount srate = engine.driver()->sample_rate();
@@ -105,4 +106,5 @@ LV2Plugin::library_path() const
return _library_path;
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/LV2Plugin.hpp b/src/engine/LV2Plugin.hpp
index e70f8b16..6bc9501a 100644
--- a/src/engine/LV2Plugin.hpp
+++ b/src/engine/LV2Plugin.hpp
@@ -37,6 +37,7 @@
#include "LV2Info.hpp"
namespace Ingen {
+namespace Engine {
class PatchImpl;
class NodeImpl;
@@ -51,7 +52,7 @@ public:
NodeImpl* instantiate(BufferFactory& bufs,
const std::string& name,
bool polyphonic,
- Ingen::PatchImpl* parent,
+ PatchImpl* parent,
Engine& engine);
const std::string symbol() const;
@@ -68,6 +69,7 @@ private:
SharedPtr<LV2Info> _lv2_info;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_LV2PLUGIN_HPP
diff --git a/src/engine/LV2RequestRunFeature.hpp b/src/engine/LV2RequestRunFeature.hpp
index 6d6b66b3..324676a7 100644
--- a/src/engine/LV2RequestRunFeature.hpp
+++ b/src/engine/LV2RequestRunFeature.hpp
@@ -34,12 +34,13 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
-struct RequestRunFeature : public Shared::LV2Features::Feature {
+struct RequestRunFeature : public Ingen::Shared::LV2Features::Feature {
struct Data {
- inline Data(Shared::World* w, Shared::Node* n) : world(w), node(n) {}
+ inline Data(Shared::World* w, Node* n) : world(w), node(n) {}
Shared::World* world;
- Shared::Node* node;
+ Node* node;
};
static void request_run(LV2_Contexts_Request_Run_Data data_ptr,
@@ -59,7 +60,7 @@ struct RequestRunFeature : public Shared::LV2Features::Feature {
free(feature);
}
- SharedPtr<LV2_Feature> feature(Shared::World* world, Shared::Node* n) {
+ SharedPtr<LV2_Feature> feature(Shared::World* world, Node* n) {
NodeImpl* node = dynamic_cast<NodeImpl*>(n);
if (!node)
return SharedPtr<LV2_Feature>();
@@ -77,6 +78,7 @@ struct RequestRunFeature : public Shared::LV2Features::Feature {
}
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_LV2_REQUEST_RUN_FEATURE_HPP
diff --git a/src/engine/LV2ResizeFeature.hpp b/src/engine/LV2ResizeFeature.hpp
index e5f2469d..4d303070 100644
--- a/src/engine/LV2ResizeFeature.hpp
+++ b/src/engine/LV2ResizeFeature.hpp
@@ -28,8 +28,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
-struct ResizeFeature : public Shared::LV2Features::Feature {
+struct ResizeFeature : public Ingen::Shared::LV2Features::Feature {
static bool resize_port(LV2_Resize_Port_Feature_Data data,
uint32_t index,
size_t size) {
@@ -51,7 +52,7 @@ struct ResizeFeature : public Shared::LV2Features::Feature {
free(feature);
}
- SharedPtr<LV2_Feature> feature(Shared::World* w, Shared::Node* n) {
+ SharedPtr<LV2_Feature> feature(Shared::World* w, Node* n) {
NodeImpl* node = dynamic_cast<NodeImpl*>(n);
if (!node)
return SharedPtr<LV2_Feature>();
@@ -66,6 +67,7 @@ struct ResizeFeature : public Shared::LV2Features::Feature {
}
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_LV2RESIZEFEATURE_HPP
diff --git a/src/engine/MessageContext.cpp b/src/engine/MessageContext.cpp
index 1b64ff9b..db65472a 100644
--- a/src/engine/MessageContext.cpp
+++ b/src/engine/MessageContext.cpp
@@ -31,6 +31,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
void
MessageContext::run(NodeImpl* node, FrameTime time)
@@ -121,4 +122,5 @@ MessageContext::execute(const Request& req)
node->reset_valid_ports();
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/MessageContext.hpp b/src/engine/MessageContext.hpp
index 45eefb73..14cd3999 100644
--- a/src/engine/MessageContext.hpp
+++ b/src/engine/MessageContext.hpp
@@ -30,6 +30,7 @@
#include "tuning.hpp"
namespace Ingen {
+namespace Engine {
class NodeImpl;
@@ -107,6 +108,7 @@ protected:
FrameTime _end_time;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_MESSAGECONTEXT_HPP
diff --git a/src/engine/NodeFactory.cpp b/src/engine/NodeFactory.cpp
index cc3e2dc2..21b8257c 100644
--- a/src/engine/NodeFactory.cpp
+++ b/src/engine/NodeFactory.cpp
@@ -45,6 +45,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
using namespace Internals;
@@ -96,7 +97,7 @@ NodeFactory::load_plugins()
void
NodeFactory::load_internal_plugins()
{
- Shared::LV2URIMap& uris = *_world->uris().get();
+ Ingen::Shared::LV2URIMap& uris = *_world->uris().get();
InternalPlugin* controller_plug = ControllerNode::internal_plugin(uris);
_plugins.insert(make_pair(controller_plug->uri(), controller_plug));
@@ -133,4 +134,5 @@ NodeFactory::load_lv2_plugins()
}
#endif // HAVE_SLV2
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/NodeFactory.hpp b/src/engine/NodeFactory.hpp
index 1271ceb2..3057319c 100644
--- a/src/engine/NodeFactory.hpp
+++ b/src/engine/NodeFactory.hpp
@@ -29,6 +29,7 @@
#include "ingen-config.h"
namespace Ingen {
+namespace Engine {
class NodeImpl;
class PatchImpl;
@@ -69,6 +70,7 @@ private:
#endif
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_NODEFACTORY_HPP
diff --git a/src/engine/NodeImpl.cpp b/src/engine/NodeImpl.cpp
index a4e52ece..fc08c8de 100644
--- a/src/engine/NodeImpl.cpp
+++ b/src/engine/NodeImpl.cpp
@@ -33,6 +33,7 @@
using namespace std;
namespace Ingen {
+namespace Engine {
NodeImpl::NodeImpl(PluginImpl* plugin, const Raul::Symbol& symbol, bool polyphonic, PatchImpl* parent, SampleRate srate)
: GraphObjectImpl(plugin->uris(), parent, symbol)
@@ -67,13 +68,13 @@ NodeImpl::~NodeImpl()
free(_valid_ports);
}
-Shared::Port*
+Port*
NodeImpl::port(uint32_t index) const
{
return (*_ports)[index];
}
-const Shared::Plugin*
+const Plugin*
NodeImpl::plugin() const
{
return _plugin;
@@ -258,5 +259,6 @@ NodeImpl::set_port_buffer(uint32_t voice, uint32_t port_num,
<< " buffer " << buf << " offset " << offset << std::endl;*/
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/NodeImpl.hpp b/src/engine/NodeImpl.hpp
index 8ba76d41..d2c49e4f 100644
--- a/src/engine/NodeImpl.hpp
+++ b/src/engine/NodeImpl.hpp
@@ -31,7 +31,10 @@ namespace Raul { template <typename T> class List; class Maid; }
namespace Ingen {
-namespace Shared { class Plugin; class Port; }
+class Plugin;
+class Port;
+
+namespace Engine {
class Buffer;
class BufferFactory;
@@ -49,7 +52,7 @@ class ProcessContext;
*
* \ingroup engine
*/
-class NodeImpl : public GraphObjectImpl, virtual public Ingen::Shared::Node
+class NodeImpl : public GraphObjectImpl, virtual public Node
{
public:
NodeImpl(PluginImpl* plugin,
@@ -142,8 +145,8 @@ public:
IntrusivePtr<Buffer> buf,
SampleCount offset);
- virtual Shared::Port* port(uint32_t index) const;
- virtual PortImpl* port_impl(uint32_t index) const { return (*_ports)[index]; }
+ virtual Port* port(uint32_t index) const;
+ virtual PortImpl* port_impl(uint32_t index) const { return (*_ports)[index]; }
/** Nodes that are connected to this Node's inputs.
* (This Node depends on them)
@@ -176,12 +179,12 @@ public:
/** Information about the Plugin this Node is an instance of.
* Not the best name - not all nodes come from plugins (ie Patch)
*/
- virtual const Shared::Plugin* plugin() const;
+ virtual const Plugin* plugin() const;
virtual void plugin(PluginImpl* pi) { _plugin = pi; }
virtual void set_buffer_size(Context& context, BufferFactory& bufs,
- Shared::PortType type, size_t size);
+ PortType type, size_t size);
/** The Patch this Node belongs to. */
inline PatchImpl* parent_patch() const { return (PatchImpl*)_parent; }
@@ -214,6 +217,7 @@ protected:
bool _traversed; ///< Flag for process order algorithm
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_NODEIMPL_HPP
diff --git a/src/engine/OSCClientSender.cpp b/src/engine/OSCClientSender.cpp
index 8d2749c7..ca2eb49f 100644
--- a/src/engine/OSCClientSender.cpp
+++ b/src/engine/OSCClientSender.cpp
@@ -36,6 +36,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
/*! \page client_osc_namespace Client OSC Namespace Documentation
*
@@ -104,11 +105,11 @@ OSCClientSender::error(const std::string& msg)
* PUT a set of properties to a path (see \ref methods).
*/
void
-OSCClientSender::put(const Raul::URI& path,
- const Shared::Resource::Properties& properties,
- Shared::Resource::Graph ctx)
+OSCClientSender::put(const Raul::URI& path,
+ const Resource::Properties& properties,
+ Resource::Graph ctx)
{
- typedef Shared::Resource::Properties::const_iterator iterator;
+ typedef Resource::Properties::const_iterator iterator;
lo_message m = lo_message_new();
lo_message_add_string(m, path.c_str());
for (iterator i = properties.begin(); i != properties.end(); ++i) {
@@ -119,9 +120,9 @@ OSCClientSender::put(const Raul::URI& path,
}
void
-OSCClientSender::delta(const Raul::URI& path,
- const Shared::Resource::Properties& remove,
- const Shared::Resource::Properties& add)
+OSCClientSender::delta(const Raul::URI& path,
+ const Resource::Properties& remove,
+ const Resource::Properties& add)
{
warn << "FIXME: OSC DELTA" << endl;
}
@@ -160,7 +161,8 @@ OSCClientSender::del(const Path& path)
* Notification a new connection has been made.
*/
void
-OSCClientSender::connect(const Path& src_port_path, const Path& dst_port_path)
+OSCClientSender::connect(const Path& src_port_path,
+ const Path& dst_port_path)
{
send("/connect", "ss", src_port_path.c_str(), dst_port_path.c_str(), LO_ARGS_END);
}
@@ -173,7 +175,8 @@ OSCClientSender::connect(const Path& src_port_path, const Path& dst_port_path)
* Notification a connection has been unmade.
*/
void
-OSCClientSender::disconnect(const Path& src_port_path, const Path& dst_port_path)
+OSCClientSender::disconnect(const Path& src_port_path,
+ const Path& dst_port_path)
{
send("/disconnect", "ss", src_port_path.c_str(), dst_port_path.c_str(), LO_ARGS_END);
}
@@ -187,7 +190,9 @@ OSCClientSender::disconnect(const Path& src_port_path, const Path& dst_port_path
* Notification of a property.
*/
void
-OSCClientSender::set_property(const URI& path, const URI& key, const Atom& value)
+OSCClientSender::set_property(const URI& path,
+ const URI& key,
+ const Atom& value)
{
lo_message m = lo_message_new();
lo_message_add_string(m, path.c_str());
@@ -211,4 +216,5 @@ OSCClientSender::activity(const Path& path)
lo_send(_address, "/activity", "s", path.c_str(), LO_ARGS_END);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/OSCClientSender.hpp b/src/engine/OSCClientSender.hpp
index 6109345b..147c0779 100644
--- a/src/engine/OSCClientSender.hpp
+++ b/src/engine/OSCClientSender.hpp
@@ -28,13 +28,17 @@
namespace Ingen {
-namespace Shared { class EngineInterface; }
+class EngineInterface;
+
+namespace Engine {
+
/** Implements ClientInterface for OSC clients (sends OSC messages).
*
* \ingroup engine
*/
-class OSCClientSender : public Shared::ClientInterface, public Shared::OSCSender
+class OSCClientSender : public ClientInterface,
+ public Ingen::Shared::OSCSender
{
public:
explicit OSCClientSender(const Raul::URI& url)
@@ -65,13 +69,13 @@ public:
void error(const std::string& msg);
- virtual void put(const Raul::URI& path,
- const Shared::Resource::Properties& properties,
- Shared::Resource::Graph ctx=Shared::Resource::DEFAULT);
+ virtual void put(const Raul::URI& path,
+ const Resource::Properties& properties,
+ Resource::Graph ctx=Resource::DEFAULT);
- virtual void delta(const Raul::URI& path,
- const Shared::Resource::Properties& remove,
- const Shared::Resource::Properties& add);
+ virtual void delta(const Raul::URI& path,
+ const Resource::Properties& remove,
+ const Resource::Properties& add);
virtual void del(const Raul::Path& path);
@@ -94,6 +98,7 @@ private:
Raul::URI _url;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_OSCCLIENTSENDER_HPP
diff --git a/src/engine/OSCEngineReceiver.cpp b/src/engine/OSCEngineReceiver.cpp
index 0babfc10..baa6d5e1 100644
--- a/src/engine/OSCEngineReceiver.cpp
+++ b/src/engine/OSCEngineReceiver.cpp
@@ -44,8 +44,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
/*! \page engine_osc_namespace Engine OSC Namespace Documentation
*
@@ -209,7 +208,7 @@ OSCEngineReceiver::set_response_address_cb(const char* path, const char* types,
/* Different address than last time, have to do a lookup */
if (!r || !r->client() || strcmp(url, r->client()->uri().c_str())) {
- Shared::ClientInterface* client = me->_engine.broadcaster()->client(url);
+ ClientInterface* client = me->_engine.broadcaster()->client(url);
if (client)
me->_request = SharedPtr<Request>(new Request(me, client, id));
else
@@ -315,7 +314,7 @@ OSCEngineReceiver::_register_client_cb(const char* path, const char* types, lo_a
lo_address addr = lo_message_get_source(msg);
char* const url = lo_address_get_url(addr);
- Shared::ClientInterface* client = new OSCClientSender((const char*)url);
+ ClientInterface* client = new OSCClientSender((const char*)url);
register_client(client);
free(url);
@@ -641,4 +640,5 @@ OSCEngineReceiver::unknown_cb(const char* path, const char* types, lo_arg** argv
return 0;
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/OSCEngineReceiver.hpp b/src/engine/OSCEngineReceiver.hpp
index ec51c358..e059a843 100644
--- a/src/engine/OSCEngineReceiver.hpp
+++ b/src/engine/OSCEngineReceiver.hpp
@@ -25,6 +25,7 @@
#include "ingen-config.h"
namespace Ingen {
+namespace Engine {
class JackDriver;
class NodeFactory;
@@ -117,6 +118,7 @@ private:
lo_server _server;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_OSCENGINERECEIVER_HPP
diff --git a/src/engine/ObjectBuffer.cpp b/src/engine/ObjectBuffer.cpp
index 910e775d..ba0b0c7f 100644
--- a/src/engine/ObjectBuffer.cpp
+++ b/src/engine/ObjectBuffer.cpp
@@ -31,8 +31,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
/** Allocate a new object buffer.
* \a capacity is in bytes, including LV2_Atom header
@@ -143,5 +142,6 @@ ObjectBuffer::prepare_write(Context& context)
_buf->size = _size - sizeof(LV2_Atom);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/ObjectBuffer.hpp b/src/engine/ObjectBuffer.hpp
index f5dd2401..fe75bd71 100644
--- a/src/engine/ObjectBuffer.hpp
+++ b/src/engine/ObjectBuffer.hpp
@@ -23,6 +23,7 @@
#include "Buffer.hpp"
namespace Ingen {
+namespace Engine {
class Context;
@@ -33,8 +34,8 @@ public:
void clear();
- void* port_data(Shared::PortType port_type, SampleCount offset);
- const void* port_data(Shared::PortType port_type, SampleCount offset) const;
+ void* port_data(PortType port_type, SampleCount offset);
+ const void* port_data(PortType port_type, SampleCount offset) const;
void prepare_write(Context& context);
@@ -49,6 +50,7 @@ private:
LV2_Atom* _buf; ///< Contents
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_OBJECTBUFFER_HPP
diff --git a/src/engine/ObjectSender.cpp b/src/engine/ObjectSender.cpp
index 48514455..ae2383d6 100644
--- a/src/engine/ObjectSender.cpp
+++ b/src/engine/ObjectSender.cpp
@@ -31,11 +31,12 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
void
-ObjectSender::send_object(ClientInterface* client, const GraphObjectImpl* object, bool recursive)
+ObjectSender::send_object(ClientInterface* client,
+ const GraphObjectImpl* object,
+ bool recursive)
{
const PatchImpl* patch = dynamic_cast<const PatchImpl*>(object);
if (patch) {
@@ -143,5 +144,6 @@ ObjectSender::send_port(ClientInterface* client, const PortImpl* port, bool bund
client->bundle_end();
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/ObjectSender.hpp b/src/engine/ObjectSender.hpp
index f1721d9f..21f0e928 100644
--- a/src/engine/ObjectSender.hpp
+++ b/src/engine/ObjectSender.hpp
@@ -20,7 +20,9 @@
namespace Ingen {
-namespace Shared { class ClientInterface; }
+class ClientInterface;
+
+namespace Engine {
class GraphObjectImpl;
class PatchImpl;
@@ -39,18 +41,25 @@ class PluginImpl;
*/
class ObjectSender {
public:
- static void send_object(Shared::ClientInterface* client,
- const GraphObjectImpl* object, bool recursive);
+ static void send_object(ClientInterface* client,
+ const GraphObjectImpl* object,
+ bool recursive);
private:
- static void send_patch(Shared::ClientInterface* client,
- const PatchImpl* patch, bool recursive, bool bundle=true);
- static void send_node(Shared::ClientInterface* client,
- const NodeImpl* node, bool recursive, bool bundle=true);
- static void send_port(Shared::ClientInterface* client,
- const PortImpl* port, bool bundle=true);
+ static void send_patch(ClientInterface* client,
+ const PatchImpl* patch,
+ bool recursive,
+ bool bundle=true);
+ static void send_node(ClientInterface* client,
+ const NodeImpl* node,
+ bool recursive,
+ bool bundle=true);
+ static void send_port(ClientInterface* client,
+ const PortImpl* port,
+ bool bundle=true);
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_OBJECTSENDER_HPP
diff --git a/src/engine/OutputPort.cpp b/src/engine/OutputPort.cpp
index 7d5b2512..0a16d2db 100644
--- a/src/engine/OutputPort.cpp
+++ b/src/engine/OutputPort.cpp
@@ -25,9 +25,7 @@
using namespace std;
namespace Ingen {
-
-namespace Shared { class Patch; }
-using namespace Shared;
+namespace Engine {
OutputPort::OutputPort(BufferFactory& bufs,
NodeImpl* parent,
@@ -74,4 +72,5 @@ OutputPort::post_process(Context& context)
broadcast_value(context, false);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/OutputPort.hpp b/src/engine/OutputPort.hpp
index be22079e..c82de111 100644
--- a/src/engine/OutputPort.hpp
+++ b/src/engine/OutputPort.hpp
@@ -23,6 +23,7 @@
#include "PortImpl.hpp"
namespace Ingen {
+namespace Engine {
/** An output port.
*
@@ -43,7 +44,7 @@ public:
const Raul::Symbol& symbol,
uint32_t index,
uint32_t poly,
- Shared::PortType type,
+ PortType type,
const Raul::Atom& value,
size_t buffer_size=0);
@@ -58,6 +59,7 @@ public:
bool is_output() const { return true; }
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_OUTPUTPORT_HPP
diff --git a/src/engine/PatchImpl.cpp b/src/engine/PatchImpl.cpp
index 0d6ccbcb..e8461ba9 100644
--- a/src/engine/PatchImpl.cpp
+++ b/src/engine/PatchImpl.cpp
@@ -37,10 +37,14 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
-
-PatchImpl::PatchImpl(Engine& engine, const Raul::Symbol& symbol, uint32_t poly, PatchImpl* parent, SampleRate srate, uint32_t internal_poly)
+namespace Engine {
+
+PatchImpl::PatchImpl(Engine& engine,
+ const Raul::Symbol& symbol,
+ uint32_t poly,
+ PatchImpl* parent,
+ SampleRate srate,
+ uint32_t internal_poly)
: NodeImpl(new PatchPlugin(*engine.world()->uris().get(),
engine.world()->uris()->ingen_Patch.c_str(), "patch", "Ingen Patch"),
symbol, poly, parent, srate)
@@ -463,4 +467,5 @@ PatchImpl::compile() const
return compiled_patch;
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/PatchImpl.hpp b/src/engine/PatchImpl.hpp
index 95acc229..8429728f 100644
--- a/src/engine/PatchImpl.hpp
+++ b/src/engine/PatchImpl.hpp
@@ -29,7 +29,9 @@
namespace Ingen {
-namespace Shared { class Connection; }
+class Connection;
+
+namespace Engine {
class CompiledPatch;
class ConnectionImpl;
@@ -45,7 +47,7 @@ class ProcessContext;
*
* \ingroup engine
*/
-class PatchImpl : public NodeImpl, public Ingen::Shared::Patch
+class PatchImpl : public NodeImpl, public Patch
{
public:
PatchImpl(Engine& engine,
@@ -62,7 +64,7 @@ public:
void process(ProcessContext& context);
- void set_buffer_size(Context& context, BufferFactory& bufs, Shared::PortType type, size_t size);
+ void set_buffer_size(Context& context, BufferFactory& bufs, PortType type, size_t size);
/** Prepare for a new (internal) polyphony value.
*
@@ -97,7 +99,7 @@ public:
uint32_t num_ports() const;
- PortImpl* create_port(BufferFactory& bufs, const std::string& name, Shared::PortType type, size_t buffer_size, bool is_output, bool polyphonic);
+ PortImpl* create_port(BufferFactory& bufs, const std::string& name, PortType type, size_t buffer_size, bool is_output, bool polyphonic);
void add_input(Raul::List<PortImpl*>::Node* port) { _input_ports.push_back(port); } ///< Preprocesser thread
void add_output(Raul::List<PortImpl*>::Node* port) { _output_ports.push_back(port); } ///< Preprocessor thread
Raul::List<PortImpl*>::Node* remove_port(const std::string& name);
@@ -157,6 +159,7 @@ PatchImpl::compile_recursive(NodeImpl* n, CompiledPatch* output) const
output->push_back(CompiledNode(n, n->providers()->size(), n->dependants()));
}
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_PATCHIMPL_HPP
diff --git a/src/engine/PatchPlugin.hpp b/src/engine/PatchPlugin.hpp
index 81c57784..ba244ef6 100644
--- a/src/engine/PatchPlugin.hpp
+++ b/src/engine/PatchPlugin.hpp
@@ -24,6 +24,7 @@
#include "PluginImpl.hpp"
namespace Ingen {
+namespace Engine {
class NodeImpl;
@@ -42,10 +43,10 @@ public:
: PluginImpl(uris, Plugin::Patch, uri)
{}
- NodeImpl* instantiate(BufferFactory& bufs,
+ NodeImpl* instantiate(BufferFactory& bufs,
const std::string& name,
bool polyphonic,
- Ingen::PatchImpl* parent,
+ PatchImpl* parent,
Engine& engine)
{
return NULL;
@@ -59,6 +60,7 @@ private:
const std::string _name;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_PATCHPLUGIN_HPP
diff --git a/src/engine/PluginImpl.cpp b/src/engine/PluginImpl.cpp
index c7b0c718..e121bd62 100644
--- a/src/engine/PluginImpl.cpp
+++ b/src/engine/PluginImpl.cpp
@@ -22,6 +22,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
void
PluginImpl::load()
@@ -44,5 +45,6 @@ PluginImpl::unload()
}
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/PluginImpl.hpp b/src/engine/PluginImpl.hpp
index a8de4b42..ab4e4a89 100644
--- a/src/engine/PluginImpl.hpp
+++ b/src/engine/PluginImpl.hpp
@@ -31,6 +31,8 @@ namespace Ingen {
namespace Shared { class LV2URIMap; }
+namespace Engine {
+
class PatchImpl;
class NodeImpl;
class Engine;
@@ -40,13 +42,15 @@ class BufferFactory;
*
* Conceptually, a Node is an instance of this.
*/
-class PluginImpl : public Ingen::Shared::Plugin
+class PluginImpl : public Plugin
, public Ingen::Shared::ResourceImpl
, public boost::noncopyable
{
public:
- PluginImpl(Shared::LV2URIMap& uris,
- Type type, const std::string& uri, const std::string library_path="")
+ PluginImpl(Ingen::Shared::LV2URIMap& uris,
+ Type type,
+ const std::string& uri,
+ const std::string library_path = "")
: ResourceImpl(uris, uri)
, _type(type)
, _library_path(library_path)
@@ -56,7 +60,7 @@ public:
virtual NodeImpl* instantiate(BufferFactory& bufs,
const std::string& name,
bool polyphonic,
- Ingen::PatchImpl* parent,
+ PatchImpl* parent,
Engine& engine) = 0;
virtual const std::string symbol() const = 0;
@@ -77,6 +81,7 @@ protected:
Glib::Module* _module;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_PLUGINIMPL_HPP
diff --git a/src/engine/PortImpl.cpp b/src/engine/PortImpl.cpp
index e0f4f405..62cc7577 100644
--- a/src/engine/PortImpl.cpp
+++ b/src/engine/PortImpl.cpp
@@ -36,8 +36,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
PortImpl::PortImpl(BufferFactory& bufs,
NodeImpl* const node,
@@ -68,7 +67,7 @@ PortImpl::PortImpl(BufferFactory& bufs,
if (_buffer_size == 0)
_buffer_size = bufs.default_buffer_size(type);
- const LV2URIMap& uris = bufs.uris();
+ const Ingen::Shared::LV2URIMap& uris = bufs.uris();
add_property(uris.rdf_type, type.uri());
set_property(uris.lv2_index, Atom((int32_t)index));
set_context(_context);
@@ -215,7 +214,7 @@ PortImpl::broadcast_value(Context& context, bool force)
break;
case PortType::VALUE:
case PortType::MESSAGE:
- LV2Atom::to_atom(_bufs.uris(), ((ObjectBuffer*)buffer(0).get())->atom(), val);
+ Ingen::Shared::LV2Atom::to_atom(_bufs.uris(), ((ObjectBuffer*)buffer(0).get())->atom(), val);
break;
}
@@ -229,7 +228,7 @@ PortImpl::broadcast_value(Context& context, bool force)
void
PortImpl::set_context(Context::ID c)
{
- const LV2URIMap& uris = _bufs.uris();
+ const Ingen::Shared::LV2URIMap& uris = _bufs.uris();
_context = c;
switch (c) {
case Context::AUDIO:
@@ -248,4 +247,5 @@ PortImpl::buffer_type() const
return *_types.begin();
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/PortImpl.hpp b/src/engine/PortImpl.hpp
index 127d8cc4..bf743d94 100644
--- a/src/engine/PortImpl.hpp
+++ b/src/engine/PortImpl.hpp
@@ -33,6 +33,7 @@
namespace Raul { class Maid; }
namespace Ingen {
+namespace Engine {
class NodeImpl;
class Buffer;
@@ -46,7 +47,7 @@ class BufferFactory;
*
* \ingroup engine
*/
-class PortImpl : public GraphObjectImpl, public Ingen::Shared::Port
+class PortImpl : public GraphObjectImpl, public Port
{
public:
~PortImpl();
@@ -143,7 +144,7 @@ protected:
const Raul::Symbol& name,
uint32_t index,
uint32_t poly,
- Shared::PortType type,
+ PortType type,
const Raul::Atom& value,
size_t buffer_size);
@@ -152,7 +153,7 @@ protected:
uint32_t _poly;
uint32_t _buffer_size;
PortType _buffer_type;
- std::set<Shared::PortType> _types;
+ std::set<PortType> _types;
Raul::Atom _value;
bool _broadcast;
bool _set_by_user;
@@ -165,6 +166,7 @@ protected:
Raul::Array<BufferFactory::Ref>* _prepared_buffers;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_PORTIMPL_HPP
diff --git a/src/engine/PostProcessor.cpp b/src/engine/PostProcessor.cpp
index d789637b..29179b00 100644
--- a/src/engine/PostProcessor.cpp
+++ b/src/engine/PostProcessor.cpp
@@ -30,6 +30,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
PostProcessor::PostProcessor(Engine& engine, size_t queue_size)
: _engine(engine)
@@ -87,4 +88,5 @@ PostProcessor::process()
}
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/PostProcessor.hpp b/src/engine/PostProcessor.hpp
index ee2fce20..f0888d2f 100644
--- a/src/engine/PostProcessor.hpp
+++ b/src/engine/PostProcessor.hpp
@@ -23,6 +23,7 @@
#include "raul/List.hpp"
namespace Ingen {
+namespace Engine {
class Event;
class Engine;
@@ -61,6 +62,7 @@ private:
uint8_t* _event_buffer;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_POSTPROCESSOR_HPP
diff --git a/src/engine/ProcessContext.cpp b/src/engine/ProcessContext.cpp
index ad405f3b..2abe7cf2 100644
--- a/src/engine/ProcessContext.cpp
+++ b/src/engine/ProcessContext.cpp
@@ -19,6 +19,7 @@
#include "ProcessSlave.hpp"
namespace Ingen {
+namespace Engine {
void
ProcessContext::activate(uint32_t parallelism, bool sched_rt)
@@ -33,4 +34,5 @@ ProcessContext::activate(uint32_t parallelism, bool sched_rt)
}
}
-}
+} // namespace Engine
+} // namespace Ingen
diff --git a/src/engine/ProcessContext.hpp b/src/engine/ProcessContext.hpp
index 9faf967e..bbaa5ad2 100644
--- a/src/engine/ProcessContext.hpp
+++ b/src/engine/ProcessContext.hpp
@@ -25,6 +25,7 @@
#include "types.hpp"
namespace Ingen {
+namespace Engine {
class ProcessSlave;
@@ -47,6 +48,7 @@ private:
Slaves _slaves;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_PROCESSCONTEXT_HPP
diff --git a/src/engine/ProcessSlave.cpp b/src/engine/ProcessSlave.cpp
index 0b719f0d..44197d4a 100644
--- a/src/engine/ProcessSlave.cpp
+++ b/src/engine/ProcessSlave.cpp
@@ -22,6 +22,7 @@
using namespace std;
namespace Ingen {
+namespace Engine {
uint32_t ProcessSlave::_next_id = 0;
@@ -68,4 +69,5 @@ ProcessSlave::_whipped()
_state = STATE_FINISHED;
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/ProcessSlave.hpp b/src/engine/ProcessSlave.hpp
index 757a7e09..39c599af 100644
--- a/src/engine/ProcessSlave.hpp
+++ b/src/engine/ProcessSlave.hpp
@@ -29,6 +29,7 @@
#include "ProcessContext.hpp"
namespace Ingen {
+namespace Engine {
class NodeImpl;
class CompiledPatch;
@@ -97,6 +98,7 @@ private:
ProcessContext* _context;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_PROCESSSLAVE_HPP
diff --git a/src/engine/QueuedEngineInterface.cpp b/src/engine/QueuedEngineInterface.cpp
index 03f4a21d..345602fa 100644
--- a/src/engine/QueuedEngineInterface.cpp
+++ b/src/engine/QueuedEngineInterface.cpp
@@ -32,8 +32,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
-
-using namespace Shared;
+namespace Engine {
QueuedEngineInterface::QueuedEngineInterface(Engine& engine, size_t queue_size)
: EventSource(queue_size)
@@ -142,17 +141,17 @@ QueuedEngineInterface::bundle_end()
// Object commands
void
-QueuedEngineInterface::put(const URI& uri,
- const Resource::Properties& properties,
- const Shared::Resource::Graph ctx)
+QueuedEngineInterface::put(const URI& uri,
+ const Resource::Properties& properties,
+ const Resource::Graph ctx)
{
push_queued(new Events::SetMetadata(_engine, _request, now(), true, ctx, uri, properties));
}
void
-QueuedEngineInterface::delta(const URI& uri,
- const Shared::Resource::Properties& remove,
- const Shared::Resource::Properties& add)
+QueuedEngineInterface::delta(const URI& uri,
+ const Resource::Properties& remove,
+ const Resource::Properties& add)
{
push_queued(new Events::SetMetadata(_engine, _request, now(), false, Resource::DEFAULT, uri, add, remove));
}
@@ -224,4 +223,5 @@ QueuedEngineInterface::request_property(const URI& uri, const URI& key)
push_queued(new Events::RequestMetadata(_engine, _request, now(), Resource::DEFAULT, uri, key));
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/QueuedEngineInterface.hpp b/src/engine/QueuedEngineInterface.hpp
index dd06a740..cb4e2c26 100644
--- a/src/engine/QueuedEngineInterface.hpp
+++ b/src/engine/QueuedEngineInterface.hpp
@@ -31,6 +31,7 @@
#include "types.hpp"
namespace Ingen {
+namespace Engine {
class Engine;
@@ -44,7 +45,8 @@ class Engine;
* If you do not register a request, you have no way of knowing if your calls
* are successful.
*/
-class QueuedEngineInterface : public EventSource, public Shared::EngineInterface
+class QueuedEngineInterface : public EventSource,
+ public EngineInterface
{
public:
QueuedEngineInterface(Engine& engine, size_t queue_size);
@@ -55,7 +57,7 @@ public:
void set_next_response_id(int32_t id);
// Client registration
- virtual void register_client(Shared::ClientInterface* client);
+ virtual void register_client(ClientInterface* client);
virtual void unregister_client(const Raul::URI& uri);
// Engine commands
@@ -70,13 +72,13 @@ public:
// CommonInterface object commands
- virtual void put(const Raul::URI& path,
- const Shared::Resource::Properties& properties,
- const Shared::Resource::Graph g=Shared::Resource::DEFAULT);
+ virtual void put(const Raul::URI& path,
+ const Resource::Properties& properties,
+ const Resource::Graph g=Resource::DEFAULT);
- virtual void delta(const Raul::URI& path,
- const Shared::Resource::Properties& remove,
- const Shared::Resource::Properties& add);
+ virtual void delta(const Raul::URI& path,
+ const Resource::Properties& remove,
+ const Resource::Properties& add);
virtual void move(const Raul::Path& old_path,
const Raul::Path& new_path);
@@ -87,7 +89,7 @@ public:
virtual void disconnect(const Raul::Path& src_port_path,
const Raul::Path& dst_port_path);
- virtual void set_property(const Raul::URI& subject_path,
+ virtual void set_property(const Raul::URI& subject_path,
const Raul::URI& predicate,
const Raul::Atom& value);
@@ -101,7 +103,8 @@ public:
// Requests
virtual void ping();
virtual void get(const Raul::URI& uri);
- virtual void request_property(const Raul::URI& object_path, const Raul::URI& key);
+ virtual void request_property(const Raul::URI& object_path,
+ const Raul::URI& key);
protected:
virtual void disable_responses();
@@ -114,6 +117,7 @@ private:
SampleCount now() const;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_QUEUEDENGINEINTERFACE_HPP
diff --git a/src/engine/QueuedEvent.cpp b/src/engine/QueuedEvent.cpp
index cc015470..e08b6b30 100644
--- a/src/engine/QueuedEvent.cpp
+++ b/src/engine/QueuedEvent.cpp
@@ -20,6 +20,7 @@
#include "ProcessContext.hpp"
namespace Ingen {
+namespace Engine {
void
QueuedEvent::pre_process()
@@ -43,5 +44,6 @@ QueuedEvent::execute(ProcessContext& context)
Event::execute(context);
}
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/QueuedEvent.hpp b/src/engine/QueuedEvent.hpp
index 3bcd16ff..99c5ff33 100644
--- a/src/engine/QueuedEvent.hpp
+++ b/src/engine/QueuedEvent.hpp
@@ -21,6 +21,7 @@
#include "Event.hpp"
namespace Ingen {
+namespace Engine {
/** An Event with a not-time-critical preprocessing stage.
*
@@ -70,6 +71,7 @@ protected:
bool _blocking;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_QUEUEDEVENT_HPP
diff --git a/src/engine/Request.hpp b/src/engine/Request.hpp
index b03bb553..3e4372c9 100644
--- a/src/engine/Request.hpp
+++ b/src/engine/Request.hpp
@@ -24,6 +24,7 @@
#include "EventSource.hpp"
namespace Ingen {
+namespace Engine {
/** Record of a request (used to respond to clients).
*
@@ -37,7 +38,9 @@ namespace Ingen {
class Request
{
public:
- Request(EventSource* source=0, Shared::ClientInterface* client=0, int32_t id=1)
+ Request(EventSource* source=0,
+ ClientInterface* client=0,
+ int32_t id=1)
: _source(source)
, _client(client)
, _id(id)
@@ -47,8 +50,8 @@ public:
int32_t id() const { return _id; }
void set_id(int32_t id) { _id = id; }
- Shared::ClientInterface* client() const { return _client; }
- void set_client(Shared::ClientInterface* client) { _client = client; }
+ ClientInterface* client() const { return _client; }
+ void set_client(ClientInterface* client) { _client = client; }
void unblock() {
if (_source)
@@ -66,11 +69,12 @@ public:
}
private:
- EventSource* _source;
- Shared::ClientInterface* _client;
- int32_t _id;
+ EventSource* _source;
+ ClientInterface* _client;
+ int32_t _id;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_REQUEST_HPP
diff --git a/src/engine/ThreadManager.hpp b/src/engine/ThreadManager.hpp
index 27235f30..9a73250d 100644
--- a/src/engine/ThreadManager.hpp
+++ b/src/engine/ThreadManager.hpp
@@ -22,6 +22,7 @@
#include "raul/Thread.hpp"
namespace Ingen {
+namespace Engine {
enum ThreadID {
THREAD_PRE_PROCESS,
@@ -49,6 +50,7 @@ public:
static bool single_threaded;
};
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_THREADMANAGER_HPP
diff --git a/src/engine/events/Connect.cpp b/src/engine/events/Connect.cpp
index 6e802d50..0f4bd465 100644
--- a/src/engine/events/Connect.cpp
+++ b/src/engine/events/Connect.cpp
@@ -37,10 +37,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-
Connect::Connect(Engine& engine, SharedPtr<Request> request, SampleCount timestamp, const Path& src_port_path, const Path& dst_port_path)
: QueuedEvent(engine, request, timestamp)
, _src_port_path(src_port_path)
@@ -199,6 +198,7 @@ Connect::post_process()
_request->respond_error(ss.str());
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Connect.hpp b/src/engine/events/Connect.hpp
index 217289f9..ec40f70b 100644
--- a/src/engine/events/Connect.hpp
+++ b/src/engine/events/Connect.hpp
@@ -30,6 +30,7 @@ namespace Raul {
}
namespace Ingen {
+namespace Engine {
class PatchImpl;
class NodeImpl;
@@ -80,6 +81,7 @@ private:
Raul::Array<BufferFactory::Ref>* _buffers;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/CreateNode.cpp b/src/engine/events/CreateNode.cpp
index 72bf4425..68e66f0a 100644
--- a/src/engine/events/CreateNode.cpp
+++ b/src/engine/events/CreateNode.cpp
@@ -37,10 +37,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-
CreateNode::CreateNode(
Engine& engine,
SharedPtr<Request> request,
@@ -141,6 +140,7 @@ CreateNode::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/CreateNode.hpp b/src/engine/events/CreateNode.hpp
index 99116409..844eca01 100644
--- a/src/engine/events/CreateNode.hpp
+++ b/src/engine/events/CreateNode.hpp
@@ -23,6 +23,7 @@
#include "ingen/Resource.hpp"
namespace Ingen {
+namespace Engine {
class PatchImpl;
class PluginImpl;
@@ -39,12 +40,12 @@ class CreateNode : public QueuedEvent
{
public:
CreateNode(
- Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- const Raul::Path& node_path,
- const Raul::URI& plugin_uri,
- const Shared::Resource::Properties& properties);
+ Engine& engine,
+ SharedPtr<Request> request,
+ SampleCount timestamp,
+ const Raul::Path& node_path,
+ const Raul::URI& plugin_uri,
+ const Resource::Properties& properties);
void pre_process();
void execute(ProcessContext& context);
@@ -60,9 +61,10 @@ private:
bool _node_already_exists;
bool _polyphonic;
- Shared::Resource::Properties _properties;
+ Resource::Properties _properties;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/CreatePatch.cpp b/src/engine/events/CreatePatch.cpp
index 73345784..dcc79513 100644
--- a/src/engine/events/CreatePatch.cpp
+++ b/src/engine/events/CreatePatch.cpp
@@ -32,10 +32,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-
CreatePatch::CreatePatch(
Engine& engine,
SharedPtr<Request> request,
@@ -81,7 +80,7 @@ CreatePatch::pre_process()
if (_parent != NULL && _poly > 1 && _poly == static_cast<int>(_parent->internal_poly()))
poly = _poly;
- const LV2URIMap& uris = *_engine.world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
_patch = new PatchImpl(_engine, path.symbol(), poly, _parent,
_engine.driver()->sample_rate(), _poly);
@@ -159,6 +158,7 @@ CreatePatch::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/CreatePatch.hpp b/src/engine/events/CreatePatch.hpp
index 42f8604e..847583a4 100644
--- a/src/engine/events/CreatePatch.hpp
+++ b/src/engine/events/CreatePatch.hpp
@@ -22,6 +22,7 @@
#include "ingen/Resource.hpp"
namespace Ingen {
+namespace Engine {
class PatchImpl;
class CompiledPatch;
@@ -36,12 +37,12 @@ class CreatePatch : public QueuedEvent
{
public:
CreatePatch(
- Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- const Raul::Path& path,
- int poly,
- const Shared::Resource::Properties& properties);
+ Engine& engine,
+ SharedPtr<Request> request,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ int poly,
+ const Resource::Properties& properties);
void pre_process();
void execute(ProcessContext& context);
@@ -56,9 +57,10 @@ private:
CompiledPatch* _compiled_patch;
int _poly;
- Shared::Resource::Properties _properties;
+ Resource::Properties _properties;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/CreatePort.cpp b/src/engine/events/CreatePort.cpp
index 278fe1b9..de5b2219 100644
--- a/src/engine/events/CreatePort.cpp
+++ b/src/engine/events/CreatePort.cpp
@@ -38,10 +38,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-
CreatePort::CreatePort(
Engine& engine,
SharedPtr<Request> request,
@@ -82,7 +81,7 @@ CreatePort::pre_process()
_patch = _engine.engine_store()->find_patch(_path.parent());
- const LV2URIMap& uris = *_engine.world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
if (_patch != NULL) {
assert(_patch->path() == _path.parent());
@@ -93,7 +92,7 @@ CreatePort::pre_process()
? _patch->external_ports()->size()
: 0;
- Shared::Resource::Properties::const_iterator index_i = _properties.find(uris.lv2_index);
+ Resource::Properties::const_iterator index_i = _properties.find(uris.lv2_index);
if (index_i == _properties.end()) {
index_i = _properties.insert(make_pair(uris.lv2_index, (int)old_num_ports));
} else if (index_i->second.type() != Atom::INT
@@ -103,7 +102,7 @@ CreatePort::pre_process()
return;
}
- Shared::Resource::Properties::const_iterator poly_i = _properties.find(uris.ingen_polyphonic);
+ Resource::Properties::const_iterator poly_i = _properties.find(uris.ingen_polyphonic);
bool polyphonic = (poly_i != _properties.end() && poly_i->second.type() == Atom::BOOL
&& poly_i->second.get_bool());
@@ -187,6 +186,7 @@ CreatePort::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/CreatePort.hpp b/src/engine/events/CreatePort.hpp
index 4b3242f1..a4be3a30 100644
--- a/src/engine/events/CreatePort.hpp
+++ b/src/engine/events/CreatePort.hpp
@@ -25,6 +25,7 @@
#include "ingen/Resource.hpp"
namespace Ingen {
+namespace Engine {
class PatchImpl;
class PortImpl;
@@ -40,13 +41,13 @@ class CreatePort : public QueuedEvent
{
public:
CreatePort(
- Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- const Raul::Path& path,
- const Raul::URI& type,
- bool is_output,
- const Shared::Resource::Properties& properties);
+ Engine& engine,
+ SharedPtr<Request> request,
+ SampleCount timestamp,
+ const Raul::Path& path,
+ const Raul::URI& type,
+ bool is_output,
+ const Resource::Properties& properties);
void pre_process();
void execute(ProcessContext& context);
@@ -63,16 +64,17 @@ private:
Raul::Path _path;
Raul::URI _type;
bool _is_output;
- Shared::PortType _data_type;
+ PortType _data_type;
PatchImpl* _patch;
PortImpl* _patch_port;
Raul::Array<PortImpl*>* _ports_array; ///< New (external) ports array for Patch
DriverPort* _driver_port; ///< Driver (eg Jack) port if this is a toplevel port
bool _succeeded;
- Shared::Resource::Properties _properties;
+ Resource::Properties _properties;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Deactivate.hpp b/src/engine/events/Deactivate.hpp
index 58b48fb8..87bfe298 100644
--- a/src/engine/events/Deactivate.hpp
+++ b/src/engine/events/Deactivate.hpp
@@ -22,6 +22,7 @@
#include "Engine.hpp"
namespace Ingen {
+namespace Engine {
namespace Events {
/** Deactivates the engine.
@@ -41,6 +42,7 @@ public:
}
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Delete.cpp b/src/engine/events/Delete.cpp
index 0d203614..50b9174a 100644
--- a/src/engine/events/Delete.cpp
+++ b/src/engine/events/Delete.cpp
@@ -33,10 +33,9 @@
using namespace std;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-
Delete::Delete(Engine& engine, SharedPtr<Request> request, FrameTime time, const Raul::Path& path)
: QueuedEvent(engine, request, time, true)
, _path(path)
@@ -202,5 +201,6 @@ Delete::post_process()
_engine.maid()->push(_garbage);
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Delete.hpp b/src/engine/events/Delete.hpp
index 76180818..234d8977 100644
--- a/src/engine/events/Delete.hpp
+++ b/src/engine/events/Delete.hpp
@@ -29,6 +29,7 @@ namespace Raul {
}
namespace Ingen {
+namespace Engine {
class GraphObjectImpl;
class NodeImpl;
@@ -84,9 +85,10 @@ private:
SharedPtr<ControlBindings::Bindings> _removed_bindings;
- SharedPtr< Raul::Table<Raul::Path, SharedPtr<Shared::GraphObject> > > _removed_table;
+ SharedPtr< Raul::Table<Raul::Path, SharedPtr<GraphObject> > > _removed_table;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Disconnect.cpp b/src/engine/events/Disconnect.cpp
index 3054c935..9de5d0fd 100644
--- a/src/engine/events/Disconnect.cpp
+++ b/src/engine/events/Disconnect.cpp
@@ -36,6 +36,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
Disconnect::Disconnect(
@@ -255,6 +256,7 @@ Disconnect::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Disconnect.hpp b/src/engine/events/Disconnect.hpp
index 3e85702f..f7e965e0 100644
--- a/src/engine/events/Disconnect.hpp
+++ b/src/engine/events/Disconnect.hpp
@@ -30,6 +30,7 @@ namespace Raul {
}
namespace Ingen {
+namespace Engine {
class CompiledPatch;
class InputPort;
@@ -95,7 +96,8 @@ private:
bool _clear_dst_port;
};
-} // namespace Ingen
} // namespace Events
+} // namespace Engine
+} // namespace Ingen
#endif // INGEN_EVENTS_DISCONNECT_HPP
diff --git a/src/engine/events/DisconnectAll.cpp b/src/engine/events/DisconnectAll.cpp
index d91d4689..cc5bf42d 100644
--- a/src/engine/events/DisconnectAll.cpp
+++ b/src/engine/events/DisconnectAll.cpp
@@ -38,6 +38,7 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
DisconnectAll::DisconnectAll(Engine& engine, SharedPtr<Request> request, SampleCount timestamp, const Path& parent_path, const Path& node_path)
@@ -185,6 +186,7 @@ DisconnectAll::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/DisconnectAll.hpp b/src/engine/events/DisconnectAll.hpp
index f6d4beb3..0d89901d 100644
--- a/src/engine/events/DisconnectAll.hpp
+++ b/src/engine/events/DisconnectAll.hpp
@@ -23,6 +23,7 @@
#include "QueuedEvent.hpp"
namespace Ingen {
+namespace Engine {
class CompiledPatch;
class NodeImpl;
@@ -78,6 +79,7 @@ private:
bool _deleting;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Get.cpp b/src/engine/events/Get.cpp
index dea81fa0..7425dd8a 100644
--- a/src/engine/events/Get.cpp
+++ b/src/engine/events/Get.cpp
@@ -30,6 +30,7 @@
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
Get::Get(
@@ -77,6 +78,7 @@ Get::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Get.hpp b/src/engine/events/Get.hpp
index ddd92bff..56bc5f17 100644
--- a/src/engine/events/Get.hpp
+++ b/src/engine/events/Get.hpp
@@ -23,6 +23,7 @@
#include "types.hpp"
namespace Ingen {
+namespace Engine {
class GraphObjectImpl;
class PluginImpl;
@@ -52,6 +53,7 @@ private:
NodeFactory::Plugins _plugins;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/LoadPlugins.cpp b/src/engine/events/LoadPlugins.cpp
index 5a3ccc66..975165bf 100644
--- a/src/engine/events/LoadPlugins.cpp
+++ b/src/engine/events/LoadPlugins.cpp
@@ -22,6 +22,7 @@
#include "ClientBroadcaster.hpp"
namespace Ingen {
+namespace Engine {
namespace Events {
LoadPlugins::LoadPlugins(Engine& engine, SharedPtr<Request> request, SampleCount timestamp)
@@ -46,6 +47,7 @@ LoadPlugins::post_process()
_request->respond_ok();
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/LoadPlugins.hpp b/src/engine/events/LoadPlugins.hpp
index c7ebc2d7..47646e92 100644
--- a/src/engine/events/LoadPlugins.hpp
+++ b/src/engine/events/LoadPlugins.hpp
@@ -21,6 +21,7 @@
#include "QueuedEvent.hpp"
namespace Ingen {
+namespace Engine {
namespace Events {
/** Loads all plugins into the internal plugin database (in NodeFactory).
@@ -38,6 +39,7 @@ public:
void post_process();
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Move.cpp b/src/engine/events/Move.cpp
index cb830f27..bccb3856 100644
--- a/src/engine/events/Move.cpp
+++ b/src/engine/events/Move.cpp
@@ -29,10 +29,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-
Move::Move(Engine& engine, SharedPtr<Request> request, SampleCount timestamp, const Path& path, const Path& new_path)
: QueuedEvent(engine, request, timestamp)
, _old_path(path)
@@ -67,12 +66,12 @@ Move::pre_process()
return;
}
- SharedPtr< Table<Path, SharedPtr<Shared::GraphObject> > > removed
+ SharedPtr< Table<Path, SharedPtr<GraphObject> > > removed
= _engine.engine_store()->remove(_store_iterator);
assert(removed->size() > 0);
- for (Table<Path, SharedPtr<Shared::GraphObject> >::iterator i = removed->begin(); i != removed->end(); ++i) {
+ for (Table<Path, SharedPtr<GraphObject> >::iterator i = removed->begin(); i != removed->end(); ++i) {
const Path& child_old_path = i->first;
assert(Path::descendant_comparator(_old_path, child_old_path));
@@ -126,5 +125,6 @@ Move::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Move.hpp b/src/engine/events/Move.hpp
index 20f9a7bb..03e7e1a6 100644
--- a/src/engine/events/Move.hpp
+++ b/src/engine/events/Move.hpp
@@ -23,6 +23,7 @@
#include "EngineStore.hpp"
namespace Ingen {
+namespace Engine {
class PatchImpl;
@@ -71,6 +72,7 @@ private:
EngineStore::iterator _store_iterator;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/Ping.hpp b/src/engine/events/Ping.hpp
index 6f59a987..ad4e1361 100644
--- a/src/engine/events/Ping.hpp
+++ b/src/engine/events/Ping.hpp
@@ -23,6 +23,7 @@
#include "Request.hpp"
namespace Ingen {
+namespace Engine {
class PortImpl;
@@ -43,6 +44,7 @@ public:
void post_process() { _request->respond_ok(); }
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/RegisterClient.cpp b/src/engine/events/RegisterClient.cpp
index 8a052e41..50916e6a 100644
--- a/src/engine/events/RegisterClient.cpp
+++ b/src/engine/events/RegisterClient.cpp
@@ -23,13 +23,14 @@
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-RegisterClient::RegisterClient(Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- const URI& uri,
- Shared::ClientInterface* client)
+RegisterClient::RegisterClient(Engine& engine,
+ SharedPtr<Request> request,
+ SampleCount timestamp,
+ const URI& uri,
+ ClientInterface* client)
: QueuedEvent(engine, request, timestamp)
, _uri(uri)
, _client(client)
@@ -50,6 +51,7 @@ RegisterClient::post_process()
_request->respond_ok();
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/RegisterClient.hpp b/src/engine/events/RegisterClient.hpp
index 7e168d6a..5e5c6a15 100644
--- a/src/engine/events/RegisterClient.hpp
+++ b/src/engine/events/RegisterClient.hpp
@@ -23,6 +23,7 @@
#include "QueuedEvent.hpp"
namespace Ingen {
+namespace Engine {
namespace Events {
/** Registers a new client with the OSC system, so it can receive updates.
@@ -32,20 +33,21 @@ namespace Events {
class RegisterClient : public QueuedEvent
{
public:
- RegisterClient(Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- const Raul::URI& uri,
- Shared::ClientInterface* client);
+ RegisterClient(Engine& engine,
+ SharedPtr<Request> request,
+ SampleCount timestamp,
+ const Raul::URI& uri,
+ ClientInterface* client);
void pre_process();
void post_process();
private:
- Raul::URI _uri;
- Shared::ClientInterface* _client;
+ Raul::URI _uri;
+ ClientInterface* _client;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/RequestMetadata.cpp b/src/engine/events/RequestMetadata.cpp
index 3e36f2be..c5642104 100644
--- a/src/engine/events/RequestMetadata.cpp
+++ b/src/engine/events/RequestMetadata.cpp
@@ -35,10 +35,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-
RequestMetadata::RequestMetadata(Engine& engine,
SharedPtr<Request> request,
SampleCount timestamp,
@@ -96,7 +95,9 @@ RequestMetadata::execute(ProcessContext& context)
} else {
IntrusivePtr<ObjectBuffer> obuf = PtrCast<ObjectBuffer>(port->buffer(0));
if (obuf) {
- LV2Atom::to_atom(*_engine.world()->uris().get(), obuf->atom(), _value);
+ Ingen::Shared::LV2Atom::to_atom(*_engine.world()->uris().get(),
+ obuf->atom(),
+ _value);
}
}
} else {
@@ -130,6 +131,7 @@ RequestMetadata::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/RequestMetadata.hpp b/src/engine/events/RequestMetadata.hpp
index 0c0389c9..e1730207 100644
--- a/src/engine/events/RequestMetadata.hpp
+++ b/src/engine/events/RequestMetadata.hpp
@@ -18,13 +18,17 @@
#ifndef INGEN_EVENTS_REQUESTMETADATA_HPP
#define INGEN_EVENTS_REQUESTMETADATA_HPP
-#include "QueuedEvent.hpp"
#include "raul/Atom.hpp"
#include "raul/URI.hpp"
+#include "QueuedEvent.hpp"
+
namespace Ingen {
namespace Shared { class ResourceImpl; }
+
+namespace Engine {
+
class GraphObjectImpl;
namespace Events {
@@ -43,12 +47,12 @@ namespace Events {
class RequestMetadata : public QueuedEvent
{
public:
- RequestMetadata(Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- Shared::Resource::Graph context,
- const Raul::URI& subject,
- const Raul::URI& key);
+ RequestMetadata(Engine& engine,
+ SharedPtr<Request> request,
+ SampleCount timestamp,
+ Resource::Graph context,
+ const Raul::URI& subject,
+ const Raul::URI& key);
void pre_process();
void execute(ProcessContext& context);
@@ -61,13 +65,14 @@ private:
PORT_VALUE
} _special_type;
- Raul::URI _uri;
- Raul::URI _key;
- Raul::Atom _value;
- Shared::ResourceImpl* _resource;
- Shared::Resource::Graph _context;
+ Raul::URI _uri;
+ Raul::URI _key;
+ Raul::Atom _value;
+ Ingen::Shared::ResourceImpl* _resource;
+ Resource::Graph _context;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SendBinding.cpp b/src/engine/events/SendBinding.cpp
index 00b9d42c..b9a43366 100644
--- a/src/engine/events/SendBinding.cpp
+++ b/src/engine/events/SendBinding.cpp
@@ -25,12 +25,13 @@
using namespace std;
namespace Ingen {
+namespace Engine {
namespace Events {
void
SendBinding::post_process()
{
- const LV2URIMap& uris = *_engine.world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
Raul::Atom::DictValue dict;
if (_type == ControlBindings::MIDI_CC) {
dict[uris.rdf_type] = uris.midi_Controller;
@@ -48,6 +49,7 @@ SendBinding::post_process()
_engine.broadcaster()->set_property(_port->path(), uris.ingen_controlBinding, dict);
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SendBinding.hpp b/src/engine/events/SendBinding.hpp
index ef00dfd4..1cd38ff2 100644
--- a/src/engine/events/SendBinding.hpp
+++ b/src/engine/events/SendBinding.hpp
@@ -23,6 +23,7 @@
#include "engine/types.hpp"
namespace Ingen {
+namespace Engine {
class PortImpl;
@@ -78,6 +79,7 @@ private:
int16_t _num;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SendPortActivity.cpp b/src/engine/events/SendPortActivity.cpp
index 69cc6292..e202c519 100644
--- a/src/engine/events/SendPortActivity.cpp
+++ b/src/engine/events/SendPortActivity.cpp
@@ -21,6 +21,7 @@
#include "ClientBroadcaster.hpp"
namespace Ingen {
+namespace Engine {
namespace Events {
void
@@ -29,6 +30,7 @@ SendPortActivity::post_process()
_engine.broadcaster()->activity(_port->path());
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SendPortActivity.hpp b/src/engine/events/SendPortActivity.hpp
index faf6683f..a99081ba 100644
--- a/src/engine/events/SendPortActivity.hpp
+++ b/src/engine/events/SendPortActivity.hpp
@@ -22,6 +22,7 @@
#include "types.hpp"
namespace Ingen {
+namespace Engine {
class PortImpl;
@@ -61,6 +62,7 @@ private:
PortImpl* _port;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SendPortValue.cpp b/src/engine/events/SendPortValue.cpp
index 3d010520..9ac60a05 100644
--- a/src/engine/events/SendPortValue.cpp
+++ b/src/engine/events/SendPortValue.cpp
@@ -25,6 +25,7 @@
using namespace std;
namespace Ingen {
+namespace Engine {
namespace Events {
void
@@ -35,6 +36,7 @@ SendPortValue::post_process()
_engine.world()->uris()->ingen_value, _value);
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SendPortValue.hpp b/src/engine/events/SendPortValue.hpp
index 8643f41c..3ed1275e 100644
--- a/src/engine/events/SendPortValue.hpp
+++ b/src/engine/events/SendPortValue.hpp
@@ -23,6 +23,7 @@
#include "engine/types.hpp"
namespace Ingen {
+namespace Engine {
class PortImpl;
@@ -74,6 +75,7 @@ private:
Raul::Atom _value;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SetMetadata.cpp b/src/engine/events/SetMetadata.cpp
index 9ca520dc..8e7ef2bf 100644
--- a/src/engine/events/SetMetadata.cpp
+++ b/src/engine/events/SetMetadata.cpp
@@ -43,10 +43,10 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-typedef Shared::Resource::Properties Properties;
+typedef Resource::Properties Properties;
SetMetadata::SetMetadata(
Engine& engine,
@@ -112,13 +112,13 @@ SetMetadata::pre_process()
return;
}
- const LV2URIMap& uris = *_engine.world()->uris().get();
+ const Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
if (is_graph_object && !_object) {
Path path(_subject.str());
bool is_patch = false, is_node = false, is_port = false, is_output = false;
PortType data_type(PortType::UNKNOWN);
- ResourceImpl::type(uris, _properties, is_patch, is_node, is_port, is_output, data_type);
+ Shared::ResourceImpl::type(uris, _properties, is_patch, is_node, is_port, is_output, data_type);
// Create a separate request without a source so EventSource isn't unblocked twice
SharedPtr<Request> sub_request(new Request(NULL, _request->client(), _request->id()));
@@ -193,7 +193,7 @@ SetMetadata::pre_process()
ev->pre_process();
_set_events.push_back(ev);
} else if (key == uris.ingen_controlBinding) {
- if (port->is_a(Shared::PortType::CONTROL)) {
+ if (port->is_a(PortType::CONTROL)) {
if (value == uris.wildcard) {
_engine.control_bindings()->learn(port);
} else if (value.type() == Atom::DICT) {
@@ -322,7 +322,7 @@ SetMetadata::execute(ProcessContext& context)
if (port) {
_engine.control_bindings()->port_binding_changed(context, port);
} else if (node) {
- if (node->plugin_impl()->type() == Shared::Plugin::Internal) {
+ if (node->plugin_impl()->type() == Plugin::Internal) {
node->learn();
}
}
@@ -374,6 +374,7 @@ SetMetadata::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SetMetadata.hpp b/src/engine/events/SetMetadata.hpp
index 8b6d322e..ca2d49ec 100644
--- a/src/engine/events/SetMetadata.hpp
+++ b/src/engine/events/SetMetadata.hpp
@@ -24,6 +24,7 @@
#include "QueuedEvent.hpp"
namespace Ingen {
+namespace Engine {
class GraphObjectImpl;
class PatchImpl;
@@ -64,14 +65,14 @@ class SetMetadata : public QueuedEvent
{
public:
SetMetadata(
- Engine& engine,
- SharedPtr<Request> request,
- SampleCount timestamp,
- bool create,
- Shared::Resource::Graph context,
- const Raul::URI& subject,
- const Shared::Resource::Properties& properties,
- const Shared::Resource::Properties& remove=Shared::Resource::Properties());
+ Engine& engine,
+ SharedPtr<Request> request,
+ SampleCount timestamp,
+ bool create,
+ Resource::Graph context,
+ const Raul::URI& subject,
+ const Resource::Properties& properties,
+ const Resource::Properties& remove = Resource::Properties());
~SetMetadata();
@@ -104,18 +105,19 @@ private:
std::vector<SpecialType> _types;
std::vector<SpecialType> _remove_types;
Raul::URI _subject;
- Shared::Resource::Properties _properties;
- Shared::Resource::Properties _remove;
- Shared::ResourceImpl* _object;
+ Resource::Properties _properties;
+ Resource::Properties _remove;
+ Ingen::Shared::ResourceImpl* _object;
PatchImpl* _patch;
CompiledPatch* _compiled_patch;
std::string _error_predicate;
bool _create;
- Shared::Resource::Graph _context;
+ Resource::Graph _context;
SharedPtr<ControlBindings::Bindings> _old_bindings;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SetPortValue.cpp b/src/engine/events/SetPortValue.cpp
index 50cf2bec..f68a6cab 100644
--- a/src/engine/events/SetPortValue.cpp
+++ b/src/engine/events/SetPortValue.cpp
@@ -42,10 +42,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
-using namespace Shared;
-
SetPortValue::SetPortValue(Engine& engine,
SharedPtr<Request> request,
bool queued,
@@ -146,7 +145,7 @@ SetPortValue::apply(Context& context)
return;
}
- LV2URIMap& uris = *_engine.world()->uris().get();
+ Ingen::Shared::LV2URIMap& uris = *_engine.world()->uris().get();
EventBuffer* const ebuf = dynamic_cast<EventBuffer*>(buf);
if (ebuf && _value.type() == Atom::BLOB) {
@@ -174,7 +173,7 @@ SetPortValue::apply(Context& context)
ObjectBuffer* const obuf = dynamic_cast<ObjectBuffer*>(buf);
if (obuf) {
obuf->atom()->size = obuf->size() - sizeof(LV2_Atom);
- if (LV2Atom::from_atom(uris, _value, obuf->atom())) {
+ if (Ingen::Shared::LV2Atom::from_atom(uris, _value, obuf->atom())) {
debug << "Converted atom " << _value << " :: " << obuf->atom()->type
<< " * " << obuf->atom()->size << " @ " << obuf->atom() << endl;
return;
@@ -218,6 +217,7 @@ SetPortValue::post_process()
}
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/SetPortValue.hpp b/src/engine/events/SetPortValue.hpp
index 80efa842..78ef0cf4 100644
--- a/src/engine/events/SetPortValue.hpp
+++ b/src/engine/events/SetPortValue.hpp
@@ -23,6 +23,7 @@
#include "types.hpp"
namespace Ingen {
+namespace Engine {
class PortImpl;
@@ -75,6 +76,7 @@ private:
PortImpl* _port;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/UnregisterClient.cpp b/src/engine/events/UnregisterClient.cpp
index 9ca94d57..6f850596 100644
--- a/src/engine/events/UnregisterClient.cpp
+++ b/src/engine/events/UnregisterClient.cpp
@@ -24,6 +24,7 @@
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Events {
UnregisterClient::UnregisterClient(Engine& engine, SharedPtr<Request> request, SampleCount timestamp, const URI& uri)
@@ -41,6 +42,7 @@ UnregisterClient::post_process()
_request->respond_error("Unable to unregister client");
}
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/events/UnregisterClient.hpp b/src/engine/events/UnregisterClient.hpp
index 84b1fbc2..427fc897 100644
--- a/src/engine/events/UnregisterClient.hpp
+++ b/src/engine/events/UnregisterClient.hpp
@@ -22,6 +22,7 @@
#include "raul/URI.hpp"
namespace Ingen {
+namespace Engine {
namespace Events {
/** Unregisters an OSC client so it no longer receives notifications.
@@ -42,6 +43,7 @@ private:
Raul::URI _uri;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Events
diff --git a/src/engine/ingen_engine.cpp b/src/engine/ingen_engine.cpp
index 2bcaa64b..7022f567 100644
--- a/src/engine/ingen_engine.cpp
+++ b/src/engine/ingen_engine.cpp
@@ -26,11 +26,12 @@ using namespace Ingen;
struct IngenEngineModule : public Ingen::Shared::Module {
virtual void load(Ingen::Shared::World* world) {
- set_denormal_flags();
- SharedPtr<Engine> engine(new Ingen::Engine(world));
+ Engine::set_denormal_flags();
+ SharedPtr<Engine::Engine> engine(new Engine::Engine(world));
world->set_local_engine(engine);
- SharedPtr<QueuedEngineInterface> interface(
- new Ingen::QueuedEngineInterface(*engine.get(), event_queue_size));
+ SharedPtr<Engine::QueuedEngineInterface> interface(
+ new Engine::QueuedEngineInterface(*engine.get(),
+ Engine::event_queue_size));
world->set_engine(interface);
engine->add_event_source(interface);
assert(world->local_engine() == engine);
diff --git a/src/engine/ingen_jack.cpp b/src/engine/ingen_jack.cpp
index e8645cb9..e46dd8a6 100644
--- a/src/engine/ingen_jack.cpp
+++ b/src/engine/ingen_jack.cpp
@@ -25,11 +25,12 @@ using namespace Ingen;
struct IngenJackModule : public Ingen::Shared::Module {
void load(Ingen::Shared::World* world) {
- Ingen::JackDriver* driver = new Ingen::JackDriver(
- *(Engine*)world->local_engine().get());
+ Engine::JackDriver* driver = new Engine::JackDriver(
+ *(Engine::Engine*)world->local_engine().get());
driver->attach(world->conf()->option("jack-server").get_string(),
world->conf()->option("jack-client").get_string(), NULL);
- ((Engine*)world->local_engine().get())->set_driver(SharedPtr<Driver>(driver));
+ ((Engine::Engine*)world->local_engine().get())->set_driver(
+ SharedPtr<Engine::Driver>(driver));
}
};
diff --git a/src/engine/ingen_lv2.cpp b/src/engine/ingen_lv2.cpp
index c48e65fa..44ebc52b 100644
--- a/src/engine/ingen_lv2.cpp
+++ b/src/engine/ingen_lv2.cpp
@@ -63,19 +63,19 @@ public:
typedef std::vector< SharedPtr<const LV2Patch> > Patches;
- Patches patches;
- Ingen::Configuration conf;
- int argc;
- char** argv;
+ Patches patches;
+ Ingen::Shared::Configuration conf;
+ int argc;
+ char** argv;
};
/** Library state (constructed/destructed on library load/unload) */
Lib lib;
namespace Ingen {
-namespace LV2 {
+namespace Engine {
-struct LV2Driver;
+class LV2Driver;
class LV2Port : public DriverPort
{
@@ -123,7 +123,7 @@ private:
void* _buffer;
};
-struct LV2Driver : public Driver {
+class LV2Driver : public Ingen::Engine::Driver {
private:
typedef std::vector<LV2Port*> Ports;
@@ -164,7 +164,8 @@ public:
_ports.push_back((LV2Port*)port);
}
- virtual Raul::Deletable* remove_port(const Raul::Path& path, Ingen::DriverPort** port=NULL) {
+ virtual Raul::Deletable* remove_port(const Raul::Path& path,
+ DriverPort** port=NULL) {
// Note this doesn't have to be realtime safe since there's no dynamic LV2 ports
ThreadManager::assert_thread(THREAD_PROCESS);
@@ -179,7 +180,7 @@ public:
return NULL;
}
- virtual bool supports(Shared::PortType port_type, Shared::EventType event_type) {
+ virtual bool supports(PortType port_type, EventType event_type) {
return true;
}
@@ -215,11 +216,14 @@ private:
Ports _ports;
};
-} // namespace LV2
+} // namespace Engine
} // namespace Ingen
extern "C" {
+using namespace Ingen;
+using namespace Ingen::Engine;
+
/** LV2 plugin library entry point */
LV2_SYMBOL_EXPORT
const LV2_Descriptor*
@@ -238,9 +242,6 @@ ingen_instantiate(const LV2_Descriptor* descriptor,
const char* bundle_path,
const LV2_Feature*const* features)
{
- using namespace Ingen;
- using namespace LV2;
-
Shared::set_bundle_path(bundle_path);
const LV2Patch* patch = NULL;
@@ -257,31 +258,32 @@ ingen_instantiate(const LV2_Descriptor* descriptor,
}
IngenPlugin* plugin = (IngenPlugin*)malloc(sizeof(IngenPlugin));
- plugin->world = new World(&lib.conf, lib.argc, lib.argv);
+ plugin->world = new Ingen::Shared::World(&lib.conf, lib.argc, lib.argv);
if (!plugin->world->load_module("serialisation")) {
delete plugin->world;
return NULL;
}
- SharedPtr<Engine> engine(new Engine(plugin->world));
+ SharedPtr<Engine::Engine> engine(new Engine::Engine(plugin->world));
plugin->world->set_local_engine(engine);
- SharedPtr<QueuedEngineInterface> interface(
- new Ingen::QueuedEngineInterface(
+ SharedPtr<Engine::QueuedEngineInterface> interface(
+ new Engine::QueuedEngineInterface(
*engine.get(),
- event_queue_size));
+ Engine::event_queue_size));
plugin->world->set_engine(interface);
engine->add_event_source(interface);
- Raul::Thread::get().set_context(THREAD_PRE_PROCESS);
- ThreadManager::single_threaded = true;
+ Raul::Thread::get().set_context(Engine::THREAD_PRE_PROCESS);
+ Engine::ThreadManager::single_threaded = true;
// FIXME: fixed (or at least maximum) buffer size
- engine->set_driver(SharedPtr<Driver>(new LV2Driver(*engine.get(), rate, 4096)));
-
+ LV2Driver* driver = new LV2Driver(*engine.get(), rate, 4096);
+ engine->set_driver(SharedPtr<Ingen::Engine::Driver>(driver));
+
engine->activate();
- ThreadManager::single_threaded = true;
+ Engine::ThreadManager::single_threaded = true;
ProcessContext context(*engine.get());
context.locate(0, UINT_MAX, 0);
@@ -310,9 +312,11 @@ ingen_instantiate(const LV2_Descriptor* descriptor,
static void
ingen_connect_port(LV2_Handle instance, uint32_t port, void* data)
{
- IngenPlugin* me = (IngenPlugin*)instance;
- Ingen::Engine* engine = (Ingen::Engine*)me->world->local_engine().get();
- Ingen::LV2::LV2Driver* driver = (Ingen::LV2::LV2Driver*)engine->driver();
+ using namespace Ingen::Engine;
+
+ IngenPlugin* me = (IngenPlugin*)instance;
+ Engine::Engine* engine = (Engine::Engine*)me->world->local_engine().get();
+ LV2Driver* driver = (LV2Driver*)engine->driver();
if (port < driver->ports().size()) {
driver->ports().at(port)->set_buffer(data);
assert(driver->ports().at(port)->patch_port()->index() == port);
@@ -331,11 +335,11 @@ ingen_activate(LV2_Handle instance)
static void
ingen_run(LV2_Handle instance, uint32_t sample_count)
{
- IngenPlugin* me = (IngenPlugin*)instance;
- Ingen::Engine* engine = (Ingen::Engine*)me->world->local_engine().get();
+ IngenPlugin* me = (IngenPlugin*)instance;
+ Engine::Engine* engine = (Engine::Engine*)me->world->local_engine().get();
// FIXME: don't do this every call
- Raul::Thread::get().set_context(Ingen::THREAD_PROCESS);
- ((Ingen::LV2::LV2Driver*)engine->driver())->run(sample_count);
+ Raul::Thread::get().set_context(Ingen::Engine::THREAD_PROCESS);
+ ((LV2Driver*)engine->driver())->run(sample_count);
}
static void
@@ -349,7 +353,7 @@ static void
ingen_cleanup(LV2_Handle instance)
{
IngenPlugin* me = (IngenPlugin*)instance;
- me->world->set_local_engine(SharedPtr<Ingen::Engine>());
+ me->world->set_local_engine(SharedPtr<Ingen::Engine::Engine>());
me->world->set_engine(SharedPtr<Ingen::EngineInterface>());
delete me->world;
free(instance);
@@ -384,7 +388,6 @@ Lib::Lib()
Glib::thread_init();
using namespace Ingen;
- using namespace LV2;
Ingen::Shared::set_bundle_path_from_code((void*)&lv2_descriptor);
diff --git a/src/engine/ingen_osc.cpp b/src/engine/ingen_osc.cpp
index 0a2d6768..09428508 100644
--- a/src/engine/ingen_osc.cpp
+++ b/src/engine/ingen_osc.cpp
@@ -26,12 +26,13 @@ using namespace Ingen;
struct IngenOSCModule : public Ingen::Shared::Module {
void load(Ingen::Shared::World* world) {
- SharedPtr<OSCEngineReceiver> interface(
- new Ingen::OSCEngineReceiver(
- *(Engine*)world->local_engine().get(),
- event_queue_size,
- world->conf()->option("engine-port").get_int32()));
- ((Engine*)world->local_engine().get())->add_event_source(interface);
+ Engine::Engine* engine = (Engine::Engine*)world->local_engine().get();
+ SharedPtr<Engine::OSCEngineReceiver> interface(
+ new Engine::OSCEngineReceiver(
+ *engine,
+ Engine::event_queue_size,
+ world->conf()->option("engine-port").get_int32()));
+ engine->add_event_source(interface);
}
};
diff --git a/src/engine/internals/Controller.cpp b/src/engine/internals/Controller.cpp
index 7b27d664..15156f08 100644
--- a/src/engine/internals/Controller.cpp
+++ b/src/engine/internals/Controller.cpp
@@ -32,10 +32,9 @@
using namespace std;
namespace Ingen {
+namespace Engine {
namespace Internals {
-using namespace Shared;
-
InternalPlugin* ControllerNode::internal_plugin(Shared::LV2URIMap& uris) {
return new InternalPlugin(uris, NS_INTERNALS "Controller", "controller");
}
@@ -49,7 +48,7 @@ ControllerNode::ControllerNode(InternalPlugin* plugin,
: NodeImpl(plugin, path, false, parent, srate)
, _learning(false)
{
- const LV2URIMap& uris = bufs.uris();
+ const Ingen::Shared::LV2URIMap& uris = bufs.uris();
_ports = new Raul::Array<PortImpl*>(6);
_midi_in_port = new InputPort(bufs, this, "input", 0, 1, PortType::EVENTS, Raul::Atom());
@@ -143,5 +142,6 @@ ControllerNode::control(ProcessContext& context, uint8_t control_num, uint8_t va
}
} // namespace Internals
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/internals/Controller.hpp b/src/engine/internals/Controller.hpp
index 1960b5e3..54b1d3ac 100644
--- a/src/engine/internals/Controller.hpp
+++ b/src/engine/internals/Controller.hpp
@@ -22,6 +22,7 @@
#include "NodeImpl.hpp"
namespace Ingen {
+namespace Engine {
class InputPort;
class OutputPort;
@@ -66,6 +67,7 @@ private:
OutputPort* _audio_port;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Internals
diff --git a/src/engine/internals/Delay.cpp b/src/engine/internals/Delay.cpp
index fb599acf..bded108a 100644
--- a/src/engine/internals/Delay.cpp
+++ b/src/engine/internals/Delay.cpp
@@ -43,10 +43,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Internals {
-using namespace Shared;
-
static const float MAX_DELAY_SECONDS = 8.0f;
InternalPlugin* DelayNode::internal_plugin(Shared::LV2URIMap& uris) {
@@ -66,7 +65,7 @@ DelayNode::DelayNode(
, _buffer_mask(0)
, _write_phase(0)
{
- const LV2URIMap& uris = bufs.uris();
+ const Ingen::Shared::LV2URIMap& uris = bufs.uris();
_ports = new Raul::Array<PortImpl*>(3);
const float default_delay = 1.0f;
@@ -204,5 +203,6 @@ DelayNode::process(ProcessContext& context)
}
} // namespace Internals
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/internals/Delay.hpp b/src/engine/internals/Delay.hpp
index 0f1ee66e..bc6f2682 100644
--- a/src/engine/internals/Delay.hpp
+++ b/src/engine/internals/Delay.hpp
@@ -24,6 +24,7 @@
#include "NodeImpl.hpp"
namespace Ingen {
+namespace Engine {
class InputPort;
class OutputPort;
@@ -70,6 +71,7 @@ private:
float _delay_samples;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Internals
diff --git a/src/engine/internals/Note.cpp b/src/engine/internals/Note.cpp
index 5ec294a1..8545857e 100644
--- a/src/engine/internals/Note.cpp
+++ b/src/engine/internals/Note.cpp
@@ -39,10 +39,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Internals {
-using namespace Shared;
-
InternalPlugin* NoteNode::internal_plugin(Shared::LV2URIMap& uris) {
return new InternalPlugin(uris, NS_INTERNALS "Note", "note");
}
@@ -59,7 +58,7 @@ NoteNode::NoteNode(
, _prepared_voices(NULL)
, _sustain(false)
{
- const LV2URIMap& uris = bufs.uris();
+ const Ingen::Shared::LV2URIMap& uris = bufs.uris();
_ports = new Raul::Array<PortImpl*>(5);
_midi_in_port = new InputPort(bufs, this, "input", 0, 1, PortType::EVENTS, Raul::Atom());
@@ -412,5 +411,6 @@ NoteNode::sustain_off(ProcessContext& context, FrameTime time)
}
} // namespace Internals
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/internals/Note.hpp b/src/engine/internals/Note.hpp
index 7677b68d..7a47dc76 100644
--- a/src/engine/internals/Note.hpp
+++ b/src/engine/internals/Note.hpp
@@ -23,6 +23,7 @@
#include "NodeImpl.hpp"
namespace Ingen {
+namespace Engine {
class InputPort;
class OutputPort;
@@ -93,6 +94,7 @@ private:
OutputPort* _trig_port;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Internals
diff --git a/src/engine/internals/Trigger.cpp b/src/engine/internals/Trigger.cpp
index 2820afe3..55474618 100644
--- a/src/engine/internals/Trigger.cpp
+++ b/src/engine/internals/Trigger.cpp
@@ -35,10 +35,9 @@ using namespace std;
using namespace Raul;
namespace Ingen {
+namespace Engine {
namespace Internals {
-using namespace Shared;
-
InternalPlugin* TriggerNode::internal_plugin(Shared::LV2URIMap& uris) {
return new InternalPlugin(uris, NS_INTERNALS "Trigger", "trigger");
}
@@ -53,7 +52,7 @@ TriggerNode::TriggerNode(
: NodeImpl(plugin, path, false, parent, srate)
, _learning(false)
{
- const LV2URIMap& uris = bufs.uris();
+ const Ingen::Shared::LV2URIMap& uris = bufs.uris();
_ports = new Raul::Array<PortImpl*>(5);
_midi_in_port = new InputPort(bufs, this, "input", 0, 1, PortType::EVENTS, Raul::Atom());
@@ -165,4 +164,5 @@ TriggerNode::note_off(ProcessContext& context, uint8_t note_num, FrameTime time)
}
} // namespace Internals
+} // namespace Engine
} // namespace Ingen
diff --git a/src/engine/internals/Trigger.hpp b/src/engine/internals/Trigger.hpp
index 53e83081..da796f5e 100644
--- a/src/engine/internals/Trigger.hpp
+++ b/src/engine/internals/Trigger.hpp
@@ -22,6 +22,7 @@
#include "NodeImpl.hpp"
namespace Ingen {
+namespace Engine {
class InputPort;
class OutputPort;
@@ -69,6 +70,7 @@ private:
OutputPort* _vel_port;
};
+} // namespace Engine
} // namespace Ingen
} // namespace Internals
diff --git a/src/engine/mix.hpp b/src/engine/mix.hpp
index 5ae8cd59..3797396b 100644
--- a/src/engine/mix.hpp
+++ b/src/engine/mix.hpp
@@ -26,11 +26,12 @@
using namespace Raul;
namespace Ingen {
+namespace Engine {
inline void
mix(Context& context, Buffer* dst, const IntrusivePtr<Buffer>* srcs, uint32_t num_srcs)
{
- using Shared::PortType;
+ using Ingen::PortType;
switch (dst->type().symbol()) {
case PortType::AUDIO:
case PortType::CONTROL:
@@ -84,6 +85,7 @@ mix(Context& context, Buffer* dst, const IntrusivePtr<Buffer>* srcs, uint32_t nu
}
}
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_MIX_HPP
diff --git a/src/engine/tuning.hpp b/src/engine/tuning.hpp
index 8415dc48..8bd8e204 100644
--- a/src/engine/tuning.hpp
+++ b/src/engine/tuning.hpp
@@ -22,6 +22,7 @@
#include <time.h>
namespace Ingen {
+namespace Engine {
// FIXME: put this in a Config class
@@ -33,6 +34,7 @@ static const size_t message_context_queue_size = 1024;
static const size_t event_bytes_per_frame = 4;
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_TUNING_HPP
diff --git a/src/engine/util.hpp b/src/engine/util.hpp
index 7cd06bd5..fb9ba161 100644
--- a/src/engine/util.hpp
+++ b/src/engine/util.hpp
@@ -40,6 +40,7 @@
#endif
namespace Ingen {
+namespace Engine {
/** Set flags to disable denormal processing.
*/
@@ -83,6 +84,7 @@ ingen_jack_port_name(const Raul::Path& path)
return path.chop_start("/");
}
+} // namespace Engine
} // namespace Ingen
#endif // INGEN_ENGINE_UTIL_HPP