clap

CLAP Audio Plugin API
Log | Files | Refs | README | LICENSE

commit ecd743283f2c0436237ebf0a4e7e462374fdb164
parent 8ed37227d731a3aac3111e9f16ad89a0480053a0
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date:   Thu, 13 May 2021 22:34:30 +0200

It is not necessary to pass the plugin pointer

Diffstat:
Minclude/clap/ext/audio-ports.h | 4++--
Minclude/clap/ext/draft/event-loop.h | 13+++++--------
Minclude/clap/ext/draft/key-name.h | 2+-
Minclude/clap/ext/draft/remote-controls.h | 2+-
Minclude/clap/ext/draft/thread-pool.h | 2+-
Minclude/clap/ext/draft/track-info.h | 2+-
Minclude/clap/ext/draft/tuning.h | 6+-----
Minclude/clap/ext/latency.h | 2+-
Minclude/clap/ext/log.h | 5+----
Minclude/clap/ext/params.h | 16+++++-----------
Minclude/clap/ext/state.h | 2+-
11 files changed, 20 insertions(+), 36 deletions(-)

diff --git a/include/clap/ext/audio-ports.h b/include/clap/ext/audio-ports.h @@ -40,12 +40,12 @@ typedef struct clap_host_audio_ports { // Tell the host that the plugin ports has changed. // The host shall deactivate the plugin and then scan the ports again. // [main-thread] - void (*changed)(clap_host *host, clap_plugin *plugin); + void (*changed)(clap_host *host); // Tell the host that the plugin ports name have changed. // It is not necessary to deactivates the plugin. // [main-thread] - void (*name_changed)(clap_host *host, clap_plugin *plugin); + void (*name_changed)(clap_host *host); } clap_host_audio_ports; #ifdef __cplusplus diff --git a/include/clap/ext/draft/event-loop.h b/include/clap/ext/draft/event-loop.h @@ -31,22 +31,19 @@ typedef struct clap_plugin_event_loop { typedef struct clap_host_event_loop { // [main-thread] - bool (*register_timer)(clap_host * host, - clap_plugin *plugin, - uint32_t period_ms, - clap_id * timer_id); + bool (*register_timer)(clap_host *host, uint32_t period_ms, clap_id *timer_id); // [main-thread] - bool (*unregister_timer)(clap_host *host, clap_plugin *plugin, clap_id timer_id); + bool (*unregister_timer)(clap_host *host, clap_id timer_id); // [main-thread] - bool (*register_fd)(clap_host *host, clap_plugin *plugin, clap_fd fd, uint32_t flags); + bool (*register_fd)(clap_host *host, clap_fd fd, uint32_t flags); // [main-thread] - bool (*modify_fd)(clap_host *host, clap_plugin *plugin, clap_fd fd, uint32_t flags); + bool (*modify_fd)(clap_host *host, clap_fd fd, uint32_t flags); // [main-thread] - bool (*unregister_fd)(clap_host *host, clap_plugin *plugin, clap_fd fd); + bool (*unregister_fd)(clap_host *host, clap_fd fd); } clap_host_event_loop; #ifdef __cplusplus diff --git a/include/clap/ext/draft/key-name.h b/include/clap/ext/draft/key-name.h @@ -27,7 +27,7 @@ typedef struct clap_plugin_note_name { typedef struct clap_host_note_name { // Informs the host that the note names has changed. // [main-thread] - void (*changed)(clap_host *host, clap_plugin *plugin); + void (*changed)(clap_host *host); } clap_host_note_name; #ifdef __cplusplus diff --git a/include/clap/ext/draft/remote-controls.h b/include/clap/ext/draft/remote-controls.h @@ -28,7 +28,7 @@ typedef struct clap_plugin_remote_controls { typedef struct clap_host_remote_controls { // Informs the host that the remote controls page has changed. // [main-thread] - void (*changed)(clap_host *host, clap_plugin *plugin); + void (*changed)(clap_host *host); } clap_host_remote_controls; #ifdef __cplusplus diff --git a/include/clap/ext/draft/thread-pool.h b/include/clap/ext/draft/thread-pool.h @@ -52,7 +52,7 @@ typedef struct clap_host_thread_pool { // The host should check that the plugin is within the process call, and if not, reject the exec // request. // [audio-thread] - bool (*request_exec)(clap_host *host, clap_plugin *plugin, uint32_t num_tasks); + bool (*request_exec)(clap_host *host, uint32_t num_tasks); } clap_host_thread_pool; #ifdef __cplusplus diff --git a/include/clap/ext/draft/track-info.h b/include/clap/ext/draft/track-info.h @@ -29,7 +29,7 @@ typedef struct clap_plugin_track_info { typedef struct clap_host_track_info { // Informs the host that the note names has changed. // [main-thread] - void (*get_track_info)(clap_host *host, clap_plugin *plugin, clap_track_info *info); + void (*get_track_info)(clap_host *host, clap_track_info *info); } clap_host_track_info; #ifdef __cplusplus diff --git a/include/clap/ext/draft/tuning.h b/include/clap/ext/draft/tuning.h @@ -16,11 +16,7 @@ typedef struct clap_host_tuning { // The plugin is not supposed to query it for each samples, // but at a rate that makes sense for low frequency modulations. // [audio-thread] - double (*key_freq)(clap_host * host, - clap_plugin *plugin, - int32_t key, - int32_t channel, - int32_t frameIndex); + double (*key_freq)(clap_host *host, int32_t key, int32_t channel, int32_t frameIndex); } clap_host_tuning; #ifdef __cplusplus diff --git a/include/clap/ext/latency.h b/include/clap/ext/latency.h @@ -20,7 +20,7 @@ typedef struct clap_host_latency { // Tell the host that the latency changed. // The new latency will be effective after deactivation of the plugin. // [main-thread] - void (*changed)(clap_host *host, clap_plugin *plugin, uint32_t new_latency); + void (*changed)(clap_host *host, uint32_t new_latency); } clap_host_latency; #ifdef __cplusplus diff --git a/include/clap/ext/log.h b/include/clap/ext/log.h @@ -23,10 +23,7 @@ typedef int32_t clap_log_severity; typedef struct clap_host_log { // Log a message through the host. // [thread-safe] - void (*log)(clap_host * host, - clap_plugin * plugin, - clap_log_severity severity, - const char * msg); + void (*log)(clap_host *host, clap_log_severity severity, const char *msg); } clap_host_log; #ifdef __cplusplus diff --git a/include/clap/ext/params.h b/include/clap/ext/params.h @@ -86,26 +86,20 @@ typedef struct clap_plugin_params { typedef struct clap_host_params { /* [main-thread] */ - void (*touch_begin)(clap_host *host, clap_plugin *plugin, clap_id param_id); + void (*touch_begin)(clap_host *host, clap_id param_id); /* [main-thread] */ - void (*touch_end)(clap_host *host, clap_plugin *plugin, clap_id param_id); + void (*touch_end)(clap_host *host, clap_id param_id); // If the plugin is activated, the host must send a parameter update // in the next process call to update the audio processor. // Only for value changes that happens in the gui. // [main-thread] - void (*changed)(clap_host * host, - clap_plugin * plugin, - clap_id param_id, - clap_param_value plain_value); + void (*changed)(clap_host *host, clap_id param_id, clap_param_value plain_value); // [main-thread] - 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, - uint32_t count); + void (*rescan)(clap_host *host, bool did_parameter_list_change); + void (*rescan_params)(clap_host *host, const uint32_t *indexes, uint32_t count); } clap_host_params; #ifdef __cplusplus diff --git a/include/clap/ext/state.h b/include/clap/ext/state.h @@ -22,7 +22,7 @@ typedef struct clap_plugin_state { typedef struct clap_host_state { /* Tell the host that the plugin state has changed. * [thread-safe] */ - void (*set_dirty)(clap_host *host, clap_plugin *plugin); + void (*set_dirty)(clap_host *host); } clap_host_state; #ifdef __cplusplus