Commit Graph

16 Commits

Author SHA1 Message Date
Robin Gareus
74c4ca3e52 Reduce reliance on boost - the hard part
the rest from `tools/convert_boost.sh`.

* replace boost::function, boost::bind with std::function and std::bind.

This required some manual fixes, notably std::placeholders,
some static_casts<>, and boost::function::clear -> = {}.
2024-10-19 03:47:21 +02:00
Robin Gareus
b4fca7bc1c Refactor API to allow VST2 plugins to callback to I/O and RegionFx 2024-08-17 16:47:26 +02:00
Robin Gareus
2e23ec4422 Use RCU to for IO::_ports (#9730) 1/2
This removes the _io_lock in favor of a RCU.
The reason for this change is to ensure data structure
consistency, notably iterators. Previously adding/removing
ports invalidated iterators, which caused [rare] crashes,
since IO::ports() simply returned a PortSet reference.

(This breaks API)
2024-06-24 22:19:22 +02:00
Robin Gareus
92183430b9 IOPlug: various small fixes (port-names, VST compat, etc) 2024-04-23 21:49:28 +02:00
Robin Gareus
d2bdf440c8 Consolidate PluginControl Code
This code was (for the most part) duplicated, and with
preparation for Region FX, a third copy motivated this
consolidation.
2024-04-21 16:32:47 +02:00
Robin Gareus
9e9fd201b5 Prevent crashes when trying to add/remove IOPlug ports
IOPlugins pinout is not [yet] configurable. Trying to add ports
resuled in a segfault since the BufferSet was not resized
(nor the plugin reconfigured)
2024-03-13 03:56:01 +01:00
Robin Gareus
6dd1ad24ab IOPlug: implement reset to default values 2023-10-31 07:41:23 +01:00
Robin Gareus
828d45c6fa Disambiguate In/Out etc for translations (2/2) #9512 2023-10-28 14:46:04 +02:00
Robin Gareus
44a2ef9098 Fix duplicate Port flush_buffer calls (#9481)
Since 62fc1d3c2e, Delivery buffers were flushed twice.
Once by copy_to_outputs() and again later by
Delivery::flush_buffers. This resulted in duplicate events
during export (see 576840c09e, MIDI buffers are not cleared
after flush to allow export processing to grab the data from
the port-buffers).

The workaround in 62fc1d3c2e is only relevant for ClickIO,
other Deliveries (Send is a Delivery) are explicitly flushed
by Route::flush_processor_buffers_locked.
2023-10-17 05:46:44 +02:00
Robin Gareus
947e6c7815 I/O Plugins: fix a heap-use-after-free
I/O plugin Controls are destroyed with ~IOPlug, however
Session::destroy()'s call to drop_references() still
triggers AutomationControl::session_going_away() on the
binding proxy.

This is even properly documented in session_object.h:

> A named object associated with a Session. Objects derived
> from this class are expected to be destroyed before the
> session calls drop_references().
2023-09-27 02:22:22 +02:00
Paul Davis
4ba4cd69ff switch from glib atomic to std::atomic (libs edition) 2023-03-24 14:19:15 -06:00
Paul Davis
b35518e212 switch from boost::{shared,weak}_ptr to std::{shared,weak}_ptr
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
2023-03-24 14:19:15 -06:00
Robin Gareus
c1a1d12354 Disambiguate GraphNode::run and IOPlug::run 2022-06-04 15:19:18 +02:00
Robin Gareus
5c85695362 Add Input Port meters for I/O Pre-Plugin outputs 2022-05-17 02:26:28 +02:00
Robin Gareus
af6f8abdc7 Prepare IOPlug processing as GraphNode 2022-05-09 17:39:05 +02:00
Robin Gareus
74f71c6683 Session-wide plugin support (IOPlug)
The idea is to run a plugin outside the process graph, and provide
its I/O as port (much like an external JACK app).

The intended use-case is NDI (provide additional I/O), but it could
also be useful for other cases.
2022-05-09 17:39:05 +02:00