93{
96 "No node bindings configured for NodeBindingsProcessor");
97 return;
98 }
99
101
103 size_t required_size = binding.push_constant_offset + binding.size;
104 if (pc_data.size() < required_size) {
105 pc_data.resize(required_size);
106 }
107
108 if (!binding.node) {
110 "Node binding '{}' has null node", name);
111 continue;
112 }
113
114 double value {};
116
119 } else {
120 value = binding.node->get_last_output();
121 }
122
123 if (binding.size == sizeof(float)) {
124 auto float_val = static_cast<float>(value);
125 std::memcpy(
126 pc_data.data() + binding.push_constant_offset,
127 &float_val,
128 sizeof(float));
129 } else if (binding.size == sizeof(double)) {
130 std::memcpy(
131 pc_data.data() + binding.push_constant_offset,
132 &value,
133 sizeof(double));
134 }
135 }
136}
#define MF_RT_ERROR(comp, ctx,...)
#define MF_WARN(comp, ctx,...)
@ INTERNAL
Processor calls extract_single_sample() - owns the processing.
std::unordered_map< std::string, NodeBinding > m_bindings
const std::vector< uint8_t > & get_push_constant_data() const
Get current push constant data.
double extract_single_sample(const std::shared_ptr< Nodes::Node > &node)
Extract a single sample from a node with proper snapshot management.
@ BufferProcessing
Buffer processing (Buffers::BufferManager, processing chains)
@ Buffers
Buffers, Managers, processors and processing chains.
std::vector< double > mode(std::span< const double > data, size_t n_windows, uint32_t hop_size, uint32_t window_size)
Mode per window via tolerance-bucketed frequency count.