|
Ingen
0.5.1
|
A duplex Port (both an InputPort and an OutputPort on a Graph) More...
#include <DuplexPort.hpp>
Inheritance diagram for Ingen::Server::DuplexPort:
Collaboration diagram for Ingen::Server::DuplexPort:Public Member Functions | |
| DuplexPort (BufferFactory &bufs, GraphImpl *parent, const Raul::Symbol &symbol, uint32_t index, bool polyphonic, PortType type, LV2_URID buf_type, size_t buf_size, const Atom &value, bool is_output) | |
| DuplexPort * | duplicate (Engine &engine, const Raul::Symbol &symbol, GraphImpl *parent) |
| void | inherit_neighbour (const PortImpl *port, Resource::Properties &remove, Resource::Properties &add) |
| Inherit any properties from a connected neighbour. More... | |
| void | on_property (const Raul::URI &uri, const Atom &value) |
| Hook called whenever a property is added. More... | |
| uint32_t | max_tail_poly (RunContext &context) const |
| Return the maximum polyphony of an output connected to this input. More... | |
| bool | prepare_poly (BufferFactory &bufs, uint32_t poly) |
| Prepare for a new (external) polyphony value. More... | |
| bool | apply_poly (RunContext &context, Raul::Maid &maid, uint32_t poly) |
| Apply a new polyphony value. More... | |
| bool | get_buffers (BufferFactory &bufs, Raul::Array< Voice > *voices, uint32_t poly, bool real_time) const |
| virtual void | set_is_driver_port (BufferFactory &bufs) |
| Prepare this port to use an external driver-provided buffer. More... | |
| void | set_driver_buffer (void *buf, uint32_t capacity) |
| Set the external driver-provided buffer. More... | |
| void | pre_process (RunContext &context) |
| Called once per process cycle. | |
| void | post_process (RunContext &context) |
| SampleCount | next_value_offset (SampleCount offset, SampleCount end) const |
Return offset of the first value change after offset. More... | |
| void | update_values (SampleCount offset, uint32_t voice) |
Update value buffer for voice to be current as of offset. More... | |
| bool | is_input () const |
| bool | is_output () const |
Public Member Functions inherited from Ingen::Server::InputPort | |
| InputPort (BufferFactory &bufs, BlockImpl *parent, const Raul::Symbol &symbol, uint32_t index, uint32_t poly, PortType type, LV2_URID buffer_type, const Atom &value, size_t buffer_size=0) | |
| bool | apply_poly (RunContext &context, Raul::Maid &maid, uint32_t poly) |
| Apply a new polyphony value. More... | |
| void | add_arc (RunContext &context, ArcImpl *c) |
| Add an arc. More... | |
| ArcImpl * | remove_arc (RunContext &context, const OutputPort *tail) |
| Remove an arc. More... | |
| bool | get_buffers (BufferFactory &bufs, Raul::Array< Voice > *voices, uint32_t poly, bool real_time) const |
Set voices as the buffers to be used for this port. More... | |
| void | pre_process (RunContext &context) |
| Set up buffer pointers. More... | |
| void | pre_run (RunContext &context) |
| Prepare buffer for access, mixing if necessary. More... | |
| void | post_process (RunContext &context) |
| Prepare buffer for next process cycle. More... | |
| SampleCount | next_value_offset (SampleCount offset, SampleCount end) const |
Return offset of the first value change after offset. More... | |
| void | update_values (SampleCount offset, uint32_t voice) |
Update value buffer for voice to be current as of offset. More... | |
| size_t | num_arcs () const |
| Pre-process thread. | |
| void | increment_num_arcs () |
| void | decrement_num_arcs () |
| bool | is_input () const |
| bool | is_output () const |
| bool | direct_connect () const |
Public Member Functions inherited from Ingen::Server::PortImpl | |
| virtual GraphType | graph_type () const |
| BlockImpl * | parent_block () const |
| A port's parent is always a block, so static cast should be safe. | |
| Raul::Array< Voice > * | set_voices (RunContext &context, Raul::Array< Voice > *voices) |
| Set the buffers array for this port. More... | |
| const Atom & | value () const |
| void | set_value (const Atom &v) |
| const Atom & | minimum () const |
| const Atom & | maximum () const |
| void | set_minimum (const Atom &min) |
| void | set_maximum (const Atom &max) |
| BufferRef | buffer (uint32_t voice) const |
| BufferRef | prepared_buffer (uint32_t voice) const |
| void | update_set_state (RunContext &context, uint32_t voice) |
| void | set_voice_value (const RunContext &context, uint32_t voice, FrameTime time, Sample value) |
| void | set_control_value (const RunContext &context, FrameTime time, Sample value) |
| bool | is_driver_port () const |
| virtual void | clear_buffers () |
| Empty buffer contents completely (ie silence) | |
| void | setup_buffers (BufferFactory &bufs, uint32_t poly, bool real_time) |
| void | activate (BufferFactory &bufs) |
| void | deactivate () |
| virtual void | connect_buffers (SampleCount offset=0) |
| virtual void | recycle_buffers () |
| uint32_t | index () const |
| bool | is_a (PortType type) const |
| bool | has_value () const |
| PortType | type () const |
| LV2_URID | buffer_type () const |
| bool | supports (const URIs::Quark &value_type) const |
| size_t | buffer_size () const |
| uint32_t | poly () const |
| uint32_t | prepared_poly () const |
| void | set_buffer_size (RunContext &context, BufferFactory &bufs, size_t size) |
| bool | is_monitored () const |
| Return true iff this port is explicitly monitored. More... | |
| void | enable_monitoring (bool monitored) |
| Explicitly turn on monitoring for this port. More... | |
| void | monitor (RunContext &context, bool send_now=false) |
| Monitor port value and broadcast to clients periodically. More... | |
| void | raise_set_by_user_flag () |
| BufferFactory & | bufs () const |
| BufferRef | value_buffer (uint32_t voice) |
| void | force_monitor_update () |
| void | set_morphable (bool is_morph, bool is_auto_morph) |
| void | set_type (PortType port_type, LV2_URID buffer_type) |
| void | cache_properties () |
| bool | is_morph () const |
| bool | is_auto_morph () const |
| bool | is_logarithmic () const |
| bool | is_sample_rate () const |
| bool | is_toggled () const |
Public Member Functions inherited from Ingen::Server::NodeImpl | |
| const Raul::Symbol & | symbol () const |
| Node * | graph_parent () const |
| NodeImpl * | parent () const |
| virtual void | set_path (const Raul::Path &new_path) |
| Rename. | |
| const Atom & | get_property (const Raul::URI &key) const |
| Get a single property value. More... | |
| virtual GraphImpl * | parent_graph () const |
| The Graph this object is a child of. More... | |
| const Raul::Path & | path () const |
Public Member Functions inherited from Ingen::Node | |
| Arcs & | arcs () |
| const Arcs & | arcs () const |
| virtual uint32_t | num_ports () const |
| virtual Node * | port (uint32_t index) const |
| virtual const Resource * | plugin () const |
| virtual LilvInstance * | instance () |
| virtual bool | save_state (const std::string &dir) const |
| Raul::URI | base_uri () const |
Public Member Functions inherited from Ingen::Resource | |
| Resource (const URIs &uris, const Raul::URI &uri) | |
| Resource & | operator= (const Resource &rhs) |
| virtual const Atom & | set_property (const Raul::URI &uri, const Atom &value, Graph ctx=Graph::DEFAULT) |
| Set (replace) a property value. More... | |
| virtual const Atom & | set_property (const Raul::URI &uri, const URIs::Quark &value, Graph ctx=Graph::DEFAULT) |
| Set (replace) a property value. More... | |
| virtual bool | add_property (const Raul::URI &uri, const Atom &value, Graph ctx=Graph::DEFAULT) |
| Add a property value. More... | |
| virtual void | remove_property (const Raul::URI &uri, const Atom &value) |
| Remove a property. More... | |
| virtual void | remove_property (const Raul::URI &uri, const URIs::Quark &value) |
| Remove a property. More... | |
| virtual bool | has_property (const Raul::URI &uri, const Atom &value) const |
| Return true iff a property is set with a specific value. More... | |
| virtual bool | has_property (const Raul::URI &uri, const URIs::Quark &value) const |
| Return true iff a property is set with a specific value. More... | |
| void | set_properties (const Properties &p) |
| Set (replace) several properties at once. More... | |
| void | add_properties (const Properties &p) |
| Add several properties at once. More... | |
| void | remove_properties (const Properties &p) |
| Remove several properties at once. More... | |
| virtual void | on_property_removed (const Raul::URI &uri, const Atom &value) |
| Hook called whenever a property value is removed. More... | |
| virtual void | set_uri (const Raul::URI &uri) |
| Properties | properties (Resource::Graph ctx) const |
| Get all the properties with a given context. More... | |
| const URIs & | uris () const |
| const Raul::URI & | uri () const |
| const Properties & | properties () const |
| Properties & | properties () |
Public Member Functions inherited from Ingen::Server::OutputPort | |
| OutputPort (BufferFactory &bufs, BlockImpl *parent, const Raul::Symbol &symbol, uint32_t index, uint32_t poly, PortType type, LV2_URID buffer_type, const Atom &value, size_t buffer_size=0) | |
| bool | get_buffers (BufferFactory &bufs, Raul::Array< Voice > *voices, uint32_t poly, bool real_time) const |
| void | pre_process (RunContext &context) |
| Called once per process cycle. | |
| void | post_process (RunContext &context) |
| SampleCount | next_value_offset (SampleCount offset, SampleCount end) const |
Return offset of the first value change after offset. More... | |
| void | update_values (SampleCount offset, uint32_t voice) |
Update value buffer for voice to be current as of offset. More... | |
| bool | is_input () const |
| bool | is_output () const |
Protected Attributes | |
| bool | _is_output |
Protected Attributes inherited from Ingen::Server::InputPort | |
| size_t | _num_arcs |
| Pre-process thread. | |
| Arcs | _arcs |
| Audio thread. | |
Protected Attributes inherited from Ingen::Server::PortImpl | |
| BufferFactory & | _bufs |
| uint32_t | _index |
| uint32_t | _poly |
| uint32_t | _buffer_size |
| uint32_t | _frames_since_monitor |
| float | _monitor_value |
| float | _peak |
| PortType | _type |
| LV2_URID | _buffer_type |
| Atom | _value |
| Atom | _min |
| Atom | _max |
| Raul::Array< Voice > * | _voices |
| Raul::Array< Voice > * | _prepared_voices |
| bool | _monitored |
| bool | _force_monitor_update |
| bool | _set_by_user |
| bool | _is_morph |
| bool | _is_auto_morph |
| bool | _is_logarithmic |
| bool | _is_sample_rate |
| bool | _is_toggled |
| bool | _is_driver_port |
Protected Attributes inherited from Ingen::Server::NodeImpl | |
| NodeImpl * | _parent |
| Raul::Path | _path |
| Raul::Symbol | _symbol |
Protected Attributes inherited from Ingen::Node | |
| Arcs | _arcs |
| Graphs only. | |
Protected Attributes inherited from Ingen::Resource | |
| const URIs & | _uris |
Additional Inherited Members | |
Public Types inherited from Ingen::Server::InputPort | |
| typedef boost::intrusive::slist< ArcImpl, boost::intrusive::constant_time_size< false > > | Arcs |
Public Types inherited from Ingen::Node | |
| enum | GraphType { GRAPH, BLOCK, PORT } |
| typedef std::pair< const Node *, const Node * > | ArcsKey |
| typedef std::map< ArcsKey, SPtr< Arc > > | Arcs |
Public Types inherited from Ingen::Resource | |
| enum | Graph { DEFAULT, EXTERNAL, INTERNAL } |
Static Public Member Functions inherited from Ingen::Node | |
| static Raul::URI | main_uri () |
| static bool | uri_is_path (const Raul::URI &uri) |
| static Raul::Path | uri_to_path (const Raul::URI &uri) |
| static Raul::URI | path_to_uri (const Raul::Path &path) |
Static Public Member Functions inherited from Ingen::Resource | |
| static Raul::URI | graph_to_uri (Graph g) |
| static Graph | uri_to_graph (const char *uri) |
| static bool | type (const URIs &uris, const Properties &properties, bool &graph, bool &block, bool &port, bool &is_output) |
| Get the ingen type from a set of Properties. More... | |
Protected Member Functions inherited from Ingen::Server::PortImpl | |
| PortImpl (BufferFactory &bufs, BlockImpl *block, const Raul::Symbol &name, uint32_t index, uint32_t poly, PortType type, LV2_URID buffer_type, const Atom &value, size_t buffer_size) | |
Protected Member Functions inherited from Ingen::Server::NodeImpl | |
| NodeImpl (const Ingen::URIs &uris, NodeImpl *parent, const Raul::Symbol &symbol) | |
Protected Member Functions inherited from Ingen::Node | |
| Node (const URIs &uris, const Raul::Path &path) | |
Protected Member Functions inherited from Ingen::Resource | |
| const Atom & | set_property (const Raul::URI &uri, const Atom &value) const |
A duplex Port (both an InputPort and an OutputPort on a Graph)
This is used for Graph ports, since they need to appear as both an input and an output port based on context. There are no actual duplex ports in Ingen, a Port is either an Input or Output. This class only exists to allow Graph outputs to appear as inputs from within that Graph, and vice versa.
|
virtual |
Inherit any properties from a connected neighbour.
This is used for Graph ports, so e.g. a control input has the range of all the ports it is connected to.
Reimplemented from Ingen::Server::PortImpl.
References Ingen::Resource::properties().
|
virtual |
Hook called whenever a property is added.
This can be used by derived classes to implement special behaviour for particular properties (e.g. ingen:value for ports).
Reimplemented from Ingen::Resource.
References Ingen::Server::InputPort::get_buffers().
|
virtual |
Return the maximum polyphony of an output connected to this input.
Reimplemented from Ingen::Server::InputPort.
|
virtual |
Prepare for a new (external) polyphony value.
Preprocessor thread, poly is actually applied by apply_poly.
Reimplemented from Ingen::Server::PortImpl.
References Ingen::Server::PortImpl::prepare_poly().
|
virtual |
Apply a new polyphony value.
Audio thread. poly Must be < the most recent value passed to prepare_poly.
Reimplemented from Ingen::Server::PortImpl.
References Ingen::Server::PortImpl::apply_poly().
|
virtual |
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.
Reimplemented from Ingen::Server::PortImpl.
References Ingen::Server::PortImpl::set_is_driver_port().
Referenced by Ingen::Server::JackDriver::create_port().
| void Ingen::Server::DuplexPort::set_driver_buffer | ( | void * | buf, |
| uint32_t | capacity | ||
| ) |
Set the external driver-provided buffer.
This may only be called in the process thread, after an earlier call to prepare_driver_buffer().
Referenced by Ingen::Server::JackDriver::add_port(), and Ingen::Server::JackDriver::create_port().
|
virtual |
Return offset of the first value change after offset.
Reimplemented from Ingen::Server::PortImpl.
References Ingen::Server::OutputPort::next_value_offset().
|
virtual |
Update value buffer for voice to be current as of offset.
Implements Ingen::Server::PortImpl.
References Ingen::Server::OutputPort::update_values().
1.8.12