commit 6063d4d4d30f9041407a1274f62704241323824e
parent 1cba85980af04c36cb2d133af8fe66abccf3a6f3
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date: Fri, 30 Apr 2021 10:37:13 +0200
more work
Diffstat:
3 files changed, 21 insertions(+), 10 deletions(-)
diff --git a/include/clap/clap.h b/include/clap/clap.h
@@ -69,8 +69,10 @@ typedef struct clap_audio_buffer {
typedef struct clap_process {
int64_t steady_time; // a steady sample time counter, requiered
int32_t frames_count; // number of frame to process
- bool has_transport; // if false then this is a free running host, no
- // transport events will be provided
+
+ // time info at sample 0
+ // If null, then this is a free running host, no transport events will be provided
+ const clap_event_time_info *time_info;
// Audio buffers, they must have the same count as specified
// by clap_plugin_audio_ports->get_count().
diff --git a/include/clap/events.h b/include/clap/events.h
@@ -66,6 +66,10 @@ typedef struct clap_event_param {
} clap_event_param;
typedef struct clap_event_time_info {
+ bool has_second_timeline;
+ bool has_beats_timeline;
+ bool has_time_signature;
+
double song_pos_beats; // position in beats
double song_pos_seconds; // position in seconds
@@ -77,8 +81,10 @@ typedef struct clap_event_time_info {
int32_t bar_number; // bar at song pos 0 has the number 0
bool is_loop_active;
- double loop_start; // in beats
- double loop_end; // in beats
+ double loop_start_beats;
+ double loop_end_beats;
+ double loop_start_seconds;
+ double loop_end_seconds;
int16_t num; // time signature numerator
int16_t denom; // time signature denominator
diff --git a/include/clap/ext/params.h b/include/clap/ext/params.h
@@ -37,10 +37,10 @@ typedef struct clap_param_info {
/* value */
clap_param_type type;
- clap_param_value min_value; // minimum plain value
- clap_param_value max_value; // maximum plain value
- clap_param_value default_value; // default plain value
- int32_t enum_size; // the number of values in the enum, if type is an enum
+ clap_param_value min_value; // minimum plain value
+ clap_param_value max_value; // maximum plain value
+ clap_param_value default_value; // default plain value
+ int32_t enum_entry_count; // the number of values in the enum, if type is an enum
} clap_param_info;
typedef struct clap_plugin_params {
@@ -52,7 +52,10 @@ typedef struct clap_plugin_params {
// [main-thread]
bool (*get_info)(clap_plugin *plugin, int32_t param_index, clap_param_info *param_info);
- int64_t (*get_enum_value)(clap_plugin *plugin, int32_t param_index, int32_t value_index);
+ bool (*get_enum_value)(clap_plugin * plugin,
+ int32_t param_index,
+ int32_t value_index,
+ clap_param_value *plain_value);
// Gets the parameter plain value.
// [main-thread]
@@ -103,7 +106,7 @@ typedef struct clap_host_params {
clap_param_value plain_value);
// [main-thread]
- void (*rescan)(clap_host *host, clap_plugin *plugin);
+ void (*rescan)(clap_host *host, clap_plugin *plugin, bool did_parameter_list_change);
void (*rescan_params)(clap_host * host,
clap_plugin * plugin,
const uint32_t *indexes,