23class mapping final :
public ossia::nonowning_graph_node
28 m_inlets.push_back(&value_in);
29 m_outlets.push_back(&value_out);
32 [[nodiscard]] std::string label()
const noexcept override {
return "mapping"; }
34 ~mapping()
override =
default;
36 void set_behavior(
const ossia::behavior& b) { m_drive = b; }
40 void swap_behavior(ossia::behavior& b)
noexcept { std::swap(m_drive, b); }
43 void run(
const ossia::token_request& t, ossia::exec_state_facade e)
noexcept override
48 const ossia::value_port& ip = *value_in;
49 ossia::value_port& op = *value_out;
52 for(
auto& tv : ip.get_data())
57 auto v = ossia::apply(
58 ossia::detail::mapper_compute_visitor{}, tv.value, m_drive.v);
60 op.write_value(std::move(v), tv.timestamp);
68 ossia::behavior m_drive;
69 ossia::value_inlet value_in;
70 ossia::value_outlet value_out;
void swap_behavior(ossia::behavior &b) noexcept
Hands the previous behavior back instead of destroying it here: on the audio thread,...
Definition mapping.hpp:40