Audio plugin host https://kx.studio/carla
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
953B

  1. #pragma once
  2. #include "../plugin.h"
  3. #include "../stream.h"
  4. static CLAP_CONSTEXPR const char CLAP_EXT_STATE[] = "clap.state";
  5. #ifdef __cplusplus
  6. extern "C" {
  7. #endif
  8. typedef struct clap_plugin_state {
  9. // Saves the plugin state into stream.
  10. // Returns true if the state was correctly saved.
  11. // [main-thread]
  12. bool (CLAP_ABI *save)(const clap_plugin_t *plugin, const clap_ostream_t *stream);
  13. // Loads the plugin state from stream.
  14. // Returns true if the state was correctly restored.
  15. // [main-thread]
  16. bool (CLAP_ABI *load)(const clap_plugin_t *plugin, const clap_istream_t *stream);
  17. } clap_plugin_state_t;
  18. typedef struct clap_host_state {
  19. // Tell the host that the plugin state has changed and should be saved again.
  20. // If a parameter value changes, then it is implicit that the state is dirty.
  21. // [main-thread]
  22. void (CLAP_ABI *mark_dirty)(const clap_host_t *host);
  23. } clap_host_state_t;
  24. #ifdef __cplusplus
  25. }
  26. #endif