commit e4e3be63f97d249ab1251fdc8341e90e1cdfa6a3
parent 59a6f4fe0b6431d6b90e7583314bfb3995942b4f
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date: Sun, 25 Apr 2021 00:10:39 +0200
Move the preset loading to its own extension
Diffstat:
2 files changed, 20 insertions(+), 4 deletions(-)
diff --git a/include/clap/ext/draft/preset-load.h b/include/clap/ext/draft/preset-load.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "../../clap.h"
+
+#define CLAP_EXT_PRESET_LOAD "clap/draft/preset-load"
+
+struct clap_plugin_preset_load {
+ // Loads a preset in the plugin native preset file format from a path.
+ // [main-thread]
+ bool (*load_preset_from_file)(struct clap_plugin *plugin, const char *path);
+};
+
+#ifdef __cplusplus
+}
+#endif
+\ No newline at end of file
diff --git a/include/clap/ext/state.h b/include/clap/ext/state.h
@@ -17,10 +17,6 @@ struct clap_plugin_state {
/* Loads the plugin state from stream.
* [main-thread] */
bool (*restore)(struct clap_plugin *plugin, struct clap_istream *stream);
-
- // Loads a preset in the plugin native preset file format from a path.
- // [main-thread]
- bool (*load_preset_from_file)(struct clap_plugin *plugin, const char *path);
};
struct clap_host_state {