21 const std::shared_ptr<Buffers::Buffer>& buf,
24 float x_min,
float x_max,
float row_h,
int depth)
29 std::vector<ValueSpec> values {
31 .
label =
"default_proc",
33 auto p = buf->get_default_processor();
39 auto chain = buf->get_processing_chain();
41 auto pre = chain->get_preprocessor(buf);
49 const auto& processors = chain->get_processors(buf);
50 for (
size_t i = 0; i < processors.size(); ++i) {
51 auto p = processors[i];
53 .
label =
"chain[" + std::to_string(i) +
"]",
60 auto post = chain->get_postprocessor(buf);
68 auto final_p = chain->get_final_processor(buf);
79 std::vector<RowBuffer> rbufs;
80 rbufs.reserve(values.size());
82 for (
const auto& spec : values)
85 surface, cursor, ind, x_max, row_h,
false);
88 result.
group = std::move(group);
100 float x_min,
float x_max,
float row_h,
int depth)
103 const auto children = root->get_child_buffers();
106 const std::string header_label =
"ch " + std::to_string(channel);
108 std::vector<ValueSpec> values {
111 .reader = [root] {
return std::to_string(root->get_num_samples()); },
115 .reader = [root] {
return std::to_string(root->get_num_children()); },
121 std::vector<RowBuffer> rbufs;
122 rbufs.reserve(values.size());
123 for (
const auto& spec : values)
126 surface, cursor, ind, x_max, row_h,
false);
129 result.
group = std::move(group);
131 auto root_result =
buffer(
132 root, surface, cursor,
133 x_min, x_max, row_h, depth + 1);
135 result.
children.push_back(std::move(root_result));
137 for (
const auto& child : children) {
138 auto child_result =
buffer(
139 child, surface, cursor,
140 x_min, x_max, row_h, depth + 2);
142 result.
children.push_back(std::move(child_result));
156 float x_min,
float x_max,
float row_h,
int depth)
162 +
" [" + std::to_string(ch_count) +
" ch]";
165 std::vector<ValueSpec> values {
168 .reader = [&bm, token] {
return std::to_string(bm.get_num_channels(token)); },
174 std::vector<RowBuffer> rbufs;
175 rbufs.reserve(values.size());
176 for (
const auto& spec : values)
179 surface, cursor, ind, x_max, row_h,
false);
182 result.
group = std::move(group);
184 for (uint32_t ch = 0; ch < ch_count; ++ch) {
188 x_min, x_max, row_h, depth + 1);
190 result.
children.push_back(std::move(ch_result));
204 float x_min,
float x_max,
float row_h,
int depth)
207 const auto children = root->get_child_buffers();
210 const std::string header_label =
"graphics ["
213 std::vector<ValueSpec> values {
215 .
label =
"vk_buffers",
216 .reader = [root] {
return std::to_string(root->get_buffer_count()); },
222 std::vector<RowBuffer> rbufs;
223 rbufs.reserve(values.size());
224 for (
const auto& spec : values)
227 surface, cursor, ind, x_max, row_h,
false);
230 result.
group = std::move(group);
232 auto root_result =
buffer(
233 root, surface, cursor,
234 x_min, x_max, row_h, depth + 1);
236 result.
children.push_back(std::move(root_result));
238 for (
const auto& child : children) {
239 auto child_result =
buffer(
240 child, surface, cursor,
241 x_min, x_max, row_h, depth + 2);
243 result.
children.push_back(std::move(child_result));
256 float x_min,
float x_max,
float row_h)
264 const std::string header_label =
"BufferManager";
266 std::vector<ValueSpec> values {
269 .reader = [&bm] {
return std::to_string(bm.get_active_tokens().size()); },
273 .reader = [&bm] {
return std::to_string(bm.get_num_input_channels()); },
279 std::vector<RowBuffer> rbufs;
280 rbufs.reserve(values.size());
281 for (
const auto& spec : values)
285 surface, cursor, x_min, x_max, row_h,
false);
288 result.
group = std::move(group);
290 for (
const auto tok : tokens) {
297 result.
children.push_back(std::move(tok_result));
301 const std::string in_label =
"inputs [" + std::to_string(in_count) +
"]";
308 in_result.
group = std::move(in_group);
311 for (uint32_t ch = 0; ch < in_count; ++ch) {
314 std::dynamic_pointer_cast<Buffers::Buffer>(buf), surface, cursor,
315 x_min, x_max, row_h, 2);
316 surface.
layer().
relate(in_result.group.header.header_id, buf_result.group.header.header_id);
317 in_result.children.push_back(std::move(buf_result));
320 result.
children.push_back(std::move(in_result));
uint32_t get_num_input_channels() const
std::shared_ptr< RootAudioBuffer > get_root_audio_buffer(ProcessingToken token, uint32_t channel=0)
Gets a root buffer for a specific token and channel (audio-specific due to channels)
std::shared_ptr< Buffers::InputAudioBuffer > get_input_buffer(uint32_t channel) const
uint32_t get_num_channels(ProcessingToken token) const
Gets the number of channels for a token (audio-specific)
std::shared_ptr< RootGraphicsBuffer > get_root_graphics_buffer(ProcessingToken token)
Gets a root graphics buffer for a specific token.
std::vector< ProcessingToken > get_active_tokens() const
Gets all currently active processing tokens.
ProcessingToken
Bitfield enum defining processing characteristics and backend requirements for buffer operations.
@ AUDIO_BACKEND
Standard audio processing backend configuration.
@ AUDIO_PARALLEL
High-performance audio processing with GPU acceleration.
constexpr std::string_view enum_to_string(EnumType value) noexcept
Universal enum to string converter using magic_enum (original case)
std::string short_dynamic_type_name(const T &obj) noexcept
Returns the unqualified dynamic type name of obj.
bool is_audio(const fs::path &filepath)