diff options
author | David Robillard <d@drobilla.net> | 2011-04-20 03:30:03 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-04-20 03:30:03 +0000 |
commit | 1119a2c71a5f6b4e23ac0a19784705002ca9cefd (patch) | |
tree | 14f1a7f2b270185defc9e99ddf03e108b6767c8b /src/engine/events/Disconnect.hpp | |
parent | 7042795c8138f03124539f0efc892fe45eb2979f (diff) | |
download | ingen-1119a2c71a5f6b4e23ac0a19784705002ca9cefd.tar.gz ingen-1119a2c71a5f6b4e23ac0a19784705002ca9cefd.tar.bz2 ingen-1119a2c71a5f6b4e23ac0a19784705002ca9cefd.zip |
Move disconnect_all to CommonInterface and implement in clients.
Factor out process thread implementation of Disconnect into Disconnect::Impl.
Implement DisconnectAll in terms of DisconnectImpl rather than abusing Disconnect.
Dramatically reduce notification communication overhead of DisconnectAll.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3179 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/engine/events/Disconnect.hpp')
-rw-r--r-- | src/engine/events/Disconnect.hpp | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/src/engine/events/Disconnect.hpp b/src/engine/events/Disconnect.hpp index 9c741293..0c177d0a 100644 --- a/src/engine/events/Disconnect.hpp +++ b/src/engine/events/Disconnect.hpp @@ -53,20 +53,31 @@ public: const Raul::Path& src_port_path, const Raul::Path& dst_port_path); - Disconnect( - Engine& engine, - SharedPtr<Request> request, - SampleCount timestamp, - PortImpl* const src_port, - PortImpl* const dst_port, - bool reconnect_dst_port); - void pre_process(); void execute(ProcessContext& context); void post_process(); -private: + class Impl { + public: + Impl(Engine& e, + PatchImpl* patch, + OutputPort* s, + InputPort* d); + bool execute(ProcessContext& context, bool set_dst_buffers); + + InputPort* dst_port() { return _dst_input_port; } + + private: + Engine& _engine; + OutputPort* _src_output_port; + InputPort* _dst_input_port; + PatchImpl* _patch; + SharedPtr<ConnectionImpl> _connection; + Raul::Array<BufferFactory::Ref>* _buffers; + }; + +private: enum ErrorType { NO_ERROR, PARENT_PATCH_DIFFERENT, @@ -80,19 +91,13 @@ private: Raul::Path _src_port_path; Raul::Path _dst_port_path; - PatchImpl* _patch; - PortImpl* _src_port; - PortImpl* _dst_port; - OutputPort* _src_output_port; - InputPort* _dst_input_port; + PatchImpl* _patch; + PortImpl* _src_port; + PortImpl* _dst_port; - SharedPtr<ConnectionImpl> _connection; CompiledPatch* _compiled_patch; ///< New process order for Patch - Raul::Array<BufferFactory::Ref>* _buffers; - - bool _internal; - bool _reconnect_dst_port; + SharedPtr<Impl> _impl; }; } // namespace Events |