Control-thread source catalog supplied by a Pulp host (standalone, Forge, or another graph host). 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 | |
| virtual | ~AudioRouteCatalog ()=default |
| virtual std::vector< AudioRouteInfo > | enumerate () const =0 |
| virtual void | set_change_callback (ChangeCallback callback)=0 |
| virtual void | set_connect_callback (ConnectCallback callback) |
| Install the host graph/bus binding invoked by connect(). | |
| virtual void | set_connect_channel_callback (ConnectChannelCallback callback) |
| Install the host graph binding for an individual channel connection. | |
| virtual void | set_disconnect_callback (DisconnectCallback callback) |
| Install the host graph binding for disconnect(). | |
| virtual bool | connect (std::string_view stable_id, std::size_t bus_index) |
| Connect a host-owned source to a declared processor input bus. | |
| virtual bool | connect_channel (std::string_view stable_id, std::size_t bus_index, std::size_t channel_index) |
| Connect one channel of a declared input bus. | |
| virtual bool | disconnect (std::size_t bus_index) |
| virtual std::string | connected_route (std::size_t bus_index) const |
| Return the stable source currently connected to a bus, or empty when the host has not selected one. | |
| virtual std::string | connected_route_channel (std::size_t bus_index, std::size_t channel_index) const |
| Return the stable source currently connected to one bus channel. | |
| virtual std::vector< std::string > | selected_route_ids () const |
| Return the stable IDs selected for each declared input bus. | |
| virtual void | restore_selected_route_ids (std::span< const std::string > ids) |
| Restore previously saved stable IDs on the control thread. | |
Control-thread source catalog supplied by a Pulp host (standalone, Forge, or another graph host).
External DAWs do not expose their project catalog through AU/VST3/CLAP; those adapters still expose the declared buses and let the DAW own its routing menu.
| using pulp::host::AudioRouteCatalog::ChangeCallback = std::function<void()> |
| using pulp::host::AudioRouteCatalog::ConnectCallback = std::function<bool(const AudioRouteInfo&, std::size_t bus_index)> |
| using pulp::host::AudioRouteCatalog::DisconnectCallback = std::function<bool(std::size_t bus_index)> |
|
virtualdefault |
|
inlinevirtual |
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 in pulp::host::MutableAudioRouteCatalog.
|
inlinevirtual |
Connect one channel of a declared input bus.
Hosts that do not expose independent channel routing inherit the bus-level connection behavior.
Reimplemented in pulp::host::MutableAudioRouteCatalog.
|
inlinevirtual |
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 in pulp::host::MutableAudioRouteCatalog.
|
inlinevirtual |
Return the stable source currently connected to one bus channel.
The default preserves compatibility with hosts that only route whole buses.
Reimplemented in pulp::host::MutableAudioRouteCatalog.
|
inlinevirtual |
Reimplemented in pulp::host::MutableAudioRouteCatalog.
|
pure virtual |
Implemented in pulp::host::MutableAudioRouteCatalog.
|
inlinevirtual |
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 in pulp::host::MutableAudioRouteCatalog.
|
inlinevirtual |
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 in pulp::host::MutableAudioRouteCatalog.
|
pure virtual |
Implemented in pulp::host::MutableAudioRouteCatalog.
|
inlinevirtual |
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 in pulp::host::MutableAudioRouteCatalog.
|
inlinevirtual |
Install the host graph binding for an individual channel connection.
Hosts that only support whole-bus routing may leave this unset.
Reimplemented in pulp::host::MutableAudioRouteCatalog.
|
inlinevirtual |
Install the host graph binding for disconnect().
Returning false keeps the catalog selection because the graph did not accept the mutation.
Reimplemented in pulp::host::MutableAudioRouteCatalog.