99{
101 if (!selected) {
102 return;
103 }
104 auto input_data = std::move(*selected);
105
106 if (op.m_transformer) {
107 auto transformed = op.m_transformer(input_data, cycle);
109
110 const bool has_downstream_route = std::ranges::any_of(
112 [](const BufferOperation& o) {
114 });
115
116 if (!has_downstream_route) {
118 if (&candidate == &op)
119 continue;
121 continue;
122 }
123
124 if (const auto buf = candidate.m_capture.get_audio_buffer()) {
125 if (std::holds_alternative<std::vector<double>>(transformed)
126 && std::get<std::vector<double>>(transformed).
size() == buf->get_data().size()) {
128 }
129 break;
130 }
131
132 if (const auto target = candidate.m_capture.get_graphics_buffer()) {
136 && same_extent(captured->second, transformed)) {
138 }
139 break;
140 }
141 }
142 }
143 }
144}
@ ROUTE
Route data to destination (buffer or container)
@ CAPTURE
Capture data from source buffer using BufferCapture strategy.
std::unordered_map< BufferOperation *, Kakshya::DataVariant > m_operation_data
void queue_graphics_write(BufferOperation &op, const std::shared_ptr< Buffers::VKBuffer > &target, const Kakshya::DataVariant &data)
std::map< std::pair< const BufferOperation *, const Buffers::VKBuffer * >, GraphicsReader > m_readers
std::vector< BufferOperation > m_operations
void write_to_buffer(const std::shared_ptr< Buffers::AudioBuffer > &buffer, const Kakshya::DataVariant &data)
bool accepts_raw_write(const std::shared_ptr< Buffers::VKBuffer > &buffer)
Whether a DataVariant can be written to the buffer's primary storage.