Small host-side implementation for standalone/Forge hosts. More...
#include <audio_route_catalog.hpp>
Public Types | |
| using | ChangeCallback = std::function<void()> |
| using | ConnectCallback = std::function<bool(const AudioRouteInfo&, std::size_t bus_index)> |
| using | ConnectChannelCallback |
| using | DisconnectCallback = std::function<bool(std::size_t bus_index)> |
Public Member Functions | |
| std::vector< AudioRouteInfo > | enumerate () const override |
| void | set_routes (std::vector< AudioRouteInfo > routes) |
| void | set_change_callback (ChangeCallback callback) override |
| void | set_connect_callback (ConnectCallback callback) override |
| Install the host graph/bus binding invoked by connect(). | |
| void | set_connect_channel_callback (ConnectChannelCallback callback) override |
| Install the host graph binding for an individual channel connection. | |
| void | set_disconnect_callback (DisconnectCallback callback) override |
| Install the host graph binding for disconnect(). | |
| bool | connect (std::string_view stable_id, std::size_t bus_index) override |
| Connect a host-owned source to a declared processor input bus. | |
| bool | connect_channel (std::string_view stable_id, std::size_t bus_index, std::size_t channel_index) override |
| Connect one channel of a declared input bus. | |
| bool | disconnect (std::size_t bus_index) override |
| std::string | connected_route (std::size_t bus_index) const override |
| Return the stable source currently connected to a bus, or empty when the host has not selected one. | |
| std::string | connected_route_channel (std::size_t bus_index, std::size_t channel_index) const override |
| Return the stable source currently connected to one bus channel. | |
| std::vector< std::string > | selected_route_ids () const override |
| Return the stable IDs selected for each declared input bus. | |
| void | restore_selected_route_ids (std::span< const std::string > ids) override |
| Restore previously saved stable IDs on the control thread. | |
Small host-side implementation for standalone/Forge hosts.
It owns only control-thread catalog state; audio adapters consume the resulting bus connection and never enumerate or mutate this object from realtime code.
|
inherited |
|
inherited |
|
inherited |
|
inherited |
|
inlineoverridevirtual |
Connect a host-owned source to a declared processor input bus.
Hosts that cannot retarget routes from the plug-in UI keep the default false and expose their own routing menu instead.
Reimplemented from pulp::host::AudioRouteCatalog.
|
inlineoverridevirtual |
Connect one channel of a declared input bus.
Hosts that do not expose independent channel routing inherit the bus-level connection behavior.
Reimplemented from pulp::host::AudioRouteCatalog.
|
inlineoverridevirtual |
Return the stable source currently connected to a bus, or empty when the host has not selected one.
This is control-thread/UI state.
Reimplemented from pulp::host::AudioRouteCatalog.
|
inlineoverridevirtual |
Return the stable source currently connected to one bus channel.
The default preserves compatibility with hosts that only route whole buses.
Reimplemented from pulp::host::AudioRouteCatalog.
|
inlineoverridevirtual |
Reimplemented from pulp::host::AudioRouteCatalog.
|
inlineoverridevirtual |
Implements pulp::host::AudioRouteCatalog.
|
inlineoverridevirtual |
Restore previously saved stable IDs on the control thread.
Invalid, unavailable, or rejected routes are ignored and do not disturb the existing selection. Hosts should call this after set_routes().
Reimplemented from pulp::host::AudioRouteCatalog.
|
inlineoverridevirtual |
Return the stable IDs selected for each declared input bus.
Hosts may store these IDs in their project/plugin state and restore them after a catalog is rebuilt. The vector index is the bus index; an empty string means that bus has no selected route.
Reimplemented from pulp::host::AudioRouteCatalog.
|
inlineoverridevirtual |
Implements pulp::host::AudioRouteCatalog.
|
inlineoverridevirtual |
Install the host graph/bus binding invoked by connect().
This runs on the control thread; the callback owns the actual graph mutation and publishes the resulting audio buffers to the realtime processor. Format adapters that cannot retarget project routes leave it unset.
Reimplemented from pulp::host::AudioRouteCatalog.
|
inlineoverridevirtual |
Install the host graph binding for an individual channel connection.
Hosts that only support whole-bus routing may leave this unset.
Reimplemented from pulp::host::AudioRouteCatalog.
|
inlineoverridevirtual |
Install the host graph binding for disconnect().
Returning false keeps the catalog selection because the graph did not accept the mutation.
Reimplemented from pulp::host::AudioRouteCatalog.
|
inline |