comparison DPF-Prymula-audioplugins/dpf/distrho/src/clap/ext/state.h @ 3:84e66ea83026

DPF-Prymula-audioplugins-0.231015-2
author prymula <prymula76@outlook.com>
date Mon, 16 Oct 2023 21:53:34 +0200
parents
children
comparison
equal deleted inserted replaced
2:cf2cb71d31dd 3:84e66ea83026
1 #pragma once
2
3 #include "../plugin.h"
4 #include "../stream.h"
5
6 static CLAP_CONSTEXPR const char CLAP_EXT_STATE[] = "clap.state";
7
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11
12 typedef struct clap_plugin_state {
13 // Saves the plugin state into stream.
14 // Returns true if the state was correctly saved.
15 // [main-thread]
16 bool(CLAP_ABI *save)(const clap_plugin_t *plugin, const clap_ostream_t *stream);
17
18 // Loads the plugin state from stream.
19 // Returns true if the state was correctly restored.
20 // [main-thread]
21 bool(CLAP_ABI *load)(const clap_plugin_t *plugin, const clap_istream_t *stream);
22 } clap_plugin_state_t;
23
24 typedef struct clap_host_state {
25 // Tell the host that the plugin state has changed and should be saved again.
26 // If a parameter value changes, then it is implicit that the state is dirty.
27 // [main-thread]
28 void(CLAP_ABI *mark_dirty)(const clap_host_t *host);
29 } clap_host_state_t;
30
31 #ifdef __cplusplus
32 }
33 #endif