Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 2fce618

Browse files
committedMar 8, 2025·
mini-curve-display: support stacked mini curves
1 parent 074211f commit 2fce618

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed
 

‎include/clap/ext/draft/mini-curve-display.h

+15-4
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,23 @@ typedef struct clap_mini_display_curve_hints {
5656

5757

5858
typedef struct clap_plugin_mini_curve_display {
59+
// Returns the number of curves the plugin wants to paint.
60+
// Be aware that the space to display those curves will be small, and too much data will make
61+
// the output hard to read.
62+
uint32_t(CLAP_ABI *get_curve_count)(const clap_plugin_t *plugin);
63+
5964
// Renders the curve into the data buffer.
60-
// The value 0 will be at the bottom of the curve and UINT16_MAX will be at the top.
61-
// The value at index 0 will be the leftmost and the value at index data_size -1 will be the
62-
// rightmost.
65+
//
66+
// The host will "stack" the curves, from the first one to the last one.
67+
// data[0] is the first curve to be painted.
68+
// data[n + 1] will be painted over data[n].
69+
// The data[n][0] will be the leftmost and data[n][data_size -1] will be the rightmost.
70+
//
71+
// The value 0 and UINT16_MAX won't be painted.
72+
// The value 1 will be at the bottom of the curve and UINT16_MAX - 1 will be at the top.
73+
//
6374
// [main-thread]
64-
bool(CLAP_ABI *render)(const clap_plugin_t *plugin, uint16_t *data, uint32_t data_size);
75+
bool(CLAP_ABI *render)(const clap_plugin_t *plugin, uint32_t curve_count, uint16_t * const *data, uint32_t data_size);
6576

6677
// Tells the plugin if the curve is currently observed or not.
6778
// When it isn't observed render() can't be called.

0 commit comments

Comments
 (0)
Please sign in to comment.