diff options
author | David Robillard <d@drobilla.net> | 2015-10-24 19:27:39 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-10-24 19:27:39 +0000 |
commit | 732bfb33105b4a534bc17caae9a50a1ccfcd7570 (patch) | |
tree | bad9715a99f11d17342adaef372361c3697beee9 /src/server/PortImpl.hpp | |
parent | ade7143eb2af64fd6743a64ebf1786dd5bbe1092 (diff) | |
download | ingen-732bfb33105b4a534bc17caae9a50a1ccfcd7570.tar.gz ingen-732bfb33105b4a534bc17caae9a50a1ccfcd7570.tar.bz2 ingen-732bfb33105b4a534bc17caae9a50a1ccfcd7570.zip |
Zero-copy to/from driver ports where possible
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5778 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/PortImpl.hpp')
-rw-r--r-- | src/server/PortImpl.hpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/server/PortImpl.hpp b/src/server/PortImpl.hpp index 3eb33e6d..d16ec10f 100644 --- a/src/server/PortImpl.hpp +++ b/src/server/PortImpl.hpp @@ -140,8 +140,17 @@ public: FrameTime time, Sample value); - void set_is_driver_port(bool b) { _is_driver_port = b; } - bool is_driver_port() const { return _is_driver_port; } + /** Prepare this port to use an external driver-provided buffer. + * + * This will avoid allocating a buffer for the port, instead the driver + * buffer is used directly. This only makes sense for ports on the + * top-level graph, which are monophonic. Non-real-time, must be called + * before using the port, followed by a call to set_driver_buffer() in the + * processing thread. + */ + virtual void set_is_driver_port(BufferFactory& bufs); + + bool is_driver_port() const { return _is_driver_port; } /** Called once per process cycle */ virtual void pre_process(Context& context) = 0; |