97{
100 "No node bindings configured for NodeBindingsProcessor");
101 return;
102 }
103
105
107 size_t required_size = binding.push_constant_offset + binding.size;
108 if (pc_data.size() < required_size) {
109 pc_data.resize(required_size);
110 }
111
112 if (!binding.node) {
114 "Node binding '{}' has null node", name);
115 continue;
116 }
117
120
123 } else {
124 value = binding.node->get_last_output();
125 }
126
127 if (binding.size == sizeof(float)) {
128 auto float_val =
static_cast<float>(
value);
129 std::memcpy(
130 pc_data.data() + binding.push_constant_offset,
131 &float_val,
132 sizeof(float));
133 } else if (binding.size == sizeof(double)) {
134 std::memcpy(
135 pc_data.data() + binding.push_constant_offset,
137 sizeof(double));
138 }
139 }
140}
#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.