Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
host_param_surface.hpp
Go to the documentation of this file.
1#pragma once
2
3// The StateStore-backed HostParamSurface used by Pulp's format adapters. The
4// framework-agnostic HostParamSurface and HostActionSurface contracts live in
5// host_surfaces.hpp, which this header re-exports.
6
7#include <functional>
8#include <optional>
9#include <string_view>
10
14
15namespace pulp::state {
16class StateStore;
17}
18
19namespace pulp::dataplane {
20
31 public:
35 using KeyResolver = std::function<std::optional<state::ParamID>(std::string_view key)>;
36
40
45 KeyResolver resolver = {});
46
47 protected:
48 bool do_has_param(std::string_view key) override;
49 double do_get_param(std::string_view key) override;
50 void do_set_param(std::string_view key, double normalized) override;
51 void do_begin_gesture(std::string_view key) override;
52 void do_end_gesture(std::string_view key) override;
53 std::string do_param_display_text(std::string_view key, double normalized) override;
54 int do_param_step_count(std::string_view key) override;
55
56 private:
57 bool owner_is_alive() const;
58
59 state::StateStore& store_;
60 runtime::AliveToken::Handle owner_alive_;
61 KeyResolver resolver_;
62};
63
64} // namespace pulp::dataplane
A framework-agnostic, native-view-facing runtime parameter accessor.
Definition host_surfaces.hpp:40
std::string do_param_display_text(std::string_view key, double normalized) override
StateStoreHostParamSurface(state::StateStore &store, KeyResolver resolver={})
bool do_has_param(std::string_view key) override
std::function< std::optional< state::ParamID >(std::string_view key)> KeyResolver
Resolve a design param_key to a registered ParamID, or nullopt if the store carries no such parameter...
Definition host_param_surface.hpp:35
StateStoreHostParamSurface(state::StateStore &store, runtime::AliveToken::Handle owner_alive, KeyResolver resolver={})
Owner-lifetime-aware form used by format adapters.
void do_end_gesture(std::string_view key) override
void do_set_param(std::string_view key, double normalized) override
void do_begin_gesture(std::string_view key) override
int do_param_step_count(std::string_view key) override
Defaults to 0 ("continuous / no index domain") so a host surface implemented outside this repo keeps ...
double do_get_param(std::string_view key) override
std::shared_ptr< State > Handle
Definition alive_token.hpp:53
Centralized parameter storage with lock-free value access.
Definition store.hpp:164
Definition audio_bridge.hpp:9
SequencerStateChannel is the audio-safe transport for a plugin's structured NON-parameter state: the ...
Definition audio_device_manager.hpp:48