commit d8c3b19f7b4a1b36c3025a22efa08deb49d7c0cb
parent d7ab2d4156407488ee410353fa6072bb09f75f6e
Author: Alexandre Bique <bique.alexandre@gmail.com>
Date: Tue, 14 Jun 2022 13:23:19 +0200
Merge pull request #94 from free-audio/next
Version 1.0.1
Diffstat:
8 files changed, 87 insertions(+), 38 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
@@ -2,6 +2,8 @@ cmake_minimum_required(VERSION 3.17)
enable_testing()
project(CLAP C CXX)
+add_custom_target(clap-tests)
+
# If you use clap as a submodule of your plugin you need some interface projects
# to allow you to link. clap-core gives you the include directory and clap-plugin-core
# gives you the core + plugin-glue.
@@ -11,27 +13,36 @@ target_include_directories(clap-core INTERFACE include)
install(DIRECTORY include DESTINATION "." OPTIONAL EXCLUDE_FROM_ALL)
add_executable(clap-compile-c EXCLUDE_FROM_ALL src/main.c)
-target_link_libraries(clap-compile-c clap-core)
-set_target_properties(clap-compile-c PROPERTIES C_STANDARD 11)
-add_executable(clap-compile-cpp EXCLUDE_FROM_ALL src/main.cc)
-target_link_libraries(clap-compile-cpp clap-core)
-set_target_properties(clap-compile-cpp PROPERTIES CXX_STANDARD 14)
+macro(clap_compile_cpp SUFFIX EXT STDC STDCPP)
+ add_executable(clap-compile-${SUFFIX} EXCLUDE_FROM_ALL src/main.${EXT})
+ target_link_libraries(clap-compile-${SUFFIX} clap-core)
+ set_target_properties(clap-compile-${SUFFIX} PROPERTIES
+ C_STANDARD ${STDC}
+ CXX_STANDARD ${STDCPP})
+ add_test(NAME test-clap-compile-${SUFFIX} COMMAND clap-compile-${SUFFIX})
+ add_dependencies(clap-tests clap-compile-${SUFFIX})
+
+ if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
+ target_compile_options(clap-compile-${SUFFIX} PRIVATE -Wall -Wextra -pedantic)
+ endif()
+
+ if (${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
+ target_compile_options(clap-compile-${SUFFIX} PRIVATE -Werror=pragma-pack)
+ endif()
+endmacro()
+
+clap_compile_cpp(c11 c 11 11)
+clap_compile_cpp(cpp11 cc 11 11)
+clap_compile_cpp(cpp14 cc 11 14)
+clap_compile_cpp(c17 c 17 17)
+clap_compile_cpp(cpp17 cc 17 17)
+clap_compile_cpp(cpp20 cc 17 20)
add_library(clap-plugin-template MODULE EXCLUDE_FROM_ALL src/plugin-template.c)
target_link_libraries(clap-plugin-template PRIVATE clap-core)
set_target_properties(clap-plugin-template PROPERTIES C_STANDARD 11)
-if (${CMAKE_C_COMPILER_ID} STREQUAL "GNU" OR ${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
- target_compile_options(clap-compile-c PRIVATE -Wall -Wextra -pedantic)
- target_compile_options(clap-compile-cpp PRIVATE -Wall -Wextra -pedantic)
-endif()
-
-if (${CMAKE_C_COMPILER_ID} STREQUAL "Clang")
- target_compile_options(clap-compile-c PRIVATE -Werror=pragma-pack)
- target_compile_options(clap-compile-cpp PRIVATE -Werror=pragma-pack)
-endif()
-
if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_link_libraries(clap-plugin-template PRIVATE -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/src/linux-my_plug.version)
target_link_libraries(clap-plugin-template PRIVATE -Wl,-z,defs)
@@ -51,9 +62,3 @@ elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows")
set_target_properties(clap-plugin-template PROPERTIES SUFFIX ".clap" PREFIX "")
endif()
-
-add_test(NAME test-clap-compile-c COMMAND clap-compile-c)
-add_test(NAME test-clap-compile-cpp COMMAND clap-compile-cpp)
-
-add_custom_target(clap-tests)
-add_dependencies(clap-tests clap-compile-c clap-compile-cpp)
diff --git a/ChangeLog.md b/ChangeLog.md
@@ -0,0 +1,43 @@
+## Changes in 1.0.1
+
+* [gui.h](include/clap/ext/gui.h): fix doc: set_scale must be provided
+* [events.h](include/clap/events.h): remove `clap_event_type` which was never used
+* [draft/transport-control.h](include/clap/ext/draft/transport-control.h): rename from `CLAP_EXT_CV` to `CLAP_EXT_TRANSPORT_CONTROL`
+* [draft/tuning.h](include/clap/ext/draft/tuning.h): rename `clap_client_tuning` to `clap_plugin_tuning`
+* [macros.h](include/clap/private/macros.h): fix compatibility with C17
+
+## Changes in 1.0.0
+
+# New stable interfaces
+
+* [audio-ports-config.h](include/clap/ext/audio-ports-config.h)
+* [audio-ports.h](include/clap/ext/audio-ports.h)
+* [event-registry.h](include/clap/ext/event-registry.h)
+* [gui.h](include/clap/ext/gui.h)
+* [latency.h](include/clap/ext/latency.h)
+* [log.h](include/clap/ext/log.h)
+* [note-name.h](include/clap/ext/note-name.h)
+* [note-ports.h](include/clap/ext/note-ports.h)
+* [params.h](include/clap/ext/params.h)
+* [posix-fd-support.h](include/clap/ext/posix-fd-support.h)
+* [render.h](include/clap/ext/render.h)
+* [state.h](include/clap/ext/state.h)
+* [tail.h](include/clap/ext/tail.h)
+* [thread-check.h](include/clap/ext/thread-check.h)
+* [thread-pool.h](include/clap/ext/thread-pool.h)
+* [timer-support.h](include/clap/ext/time-support.h)
+
+# New draft interfaces
+
+* [ambisonic.h](include/clap/ext/draft/ambisonic.h)
+* [check-for-update.h](include/clap/ext/draft/check-for-update.h)
+* [cv.h](include/clap/ext/draft/cv.h)
+* [file-reference.h](include/clap/ext/draft/file-reference.h)
+* [midi-mappings.h](include/clap/ext/draft/midi-mappings.h)
+* [preset-load.h](include/clap/ext/draft/preset-load.h)
+* [quick-controls.h](include/clap/ext/draft/quick-controls.h)
+* [surround.h](include/clap/ext/draft/surround.h)
+* [track-info.h](include/clap/ext/draft/track-info.h)
+* [transport-control.h](include/clap/ext/draft/transport-control.h)
+* [tuning.h](include/clap/ext/draft/tuning.h)
+* [voice-info.h](include/clap/ext/draft/voice-info.h)
diff --git a/README.md b/README.md
@@ -114,11 +114,7 @@ and use to get a basic plugin experience:
## Hosts
-- [Bitwig](https://bitwig.com), DAW
- - To enable CLAP, you need at least _Bitwig Studio 4.2 Beta 1_ and you'll have to add `clap : true` to:
- - Linux: `$HOME/.BitwigStudio/config.json`
- - macOS: `$HOME/Library/Application Support/Bitwig/Bitwig Studio/config.json`
- - Windows: `%LOCALAPPDATA%\Bitwig Studio\config.json`
+- [Bitwig](https://bitwig.com), you need at least _Bitwig Studio 4.3 Beta 5_
## Examples
diff --git a/include/clap/ext/draft/tuning.h b/include/clap/ext/draft/tuning.h
@@ -27,11 +27,11 @@ typedef struct clap_tuning_info {
bool is_dynamic; // true if the values may vary with time
} clap_tuning_info_t;
-typedef struct clap_client_tuning {
+typedef struct clap_plugin_tuning {
// Called when a tuning is added or removed from the pool.
// [main-thread]
void (*changed)(const clap_plugin_t *plugin);
-} clap_client_tuning_t;
+} clap_plugin_tuning_t;
// This extension provides a dynamic tuning table to the plugin.
typedef struct clap_host_tuning {
diff --git a/include/clap/ext/params.h b/include/clap/ext/params.h
@@ -167,10 +167,12 @@ typedef struct clap_param_info {
// destroyed.
void *cookie;
- char name[CLAP_NAME_SIZE]; // the display name
- char module[CLAP_PATH_SIZE]; // the module containing the param, eg:
- // "oscillators/wt1"; '/' will be used as a
- // separator to show a tree like structure.
+ // the display name
+ char name[CLAP_NAME_SIZE];
+
+ // the module path containing the param, eg:"oscillators/wt1"
+ // '/' will be used as a separator to show a tree like structure.
+ char module[CLAP_PATH_SIZE];
double min_value; // minimum plain value
double max_value; // maximum plain value
@@ -229,7 +231,7 @@ enum {
// The parameter info did change, use this flag for:
// - name change
- // - module change
+ // - module_path change
// - is_periodic (flag)
// - is_hidden (flag)
// New info takes effect immediately.
diff --git a/include/clap/private/macros.h b/include/clap/private/macros.h
@@ -27,8 +27,6 @@
#if defined(__cplusplus) && __cplusplus >= 201703L
# define CLAP_HAS_CXX17
# define CLAP_NODISCARD [[nodiscard]]
-#elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201300L
-# define CLAP_NODISCARD [[nodiscard]]
#else
# define CLAP_NODISCARD
#endif
diff --git a/include/clap/version.h b/include/clap/version.h
@@ -22,7 +22,7 @@ typedef struct clap_version {
#define CLAP_VERSION_MAJOR ((uint32_t)1)
#define CLAP_VERSION_MINOR ((uint32_t)0)
-#define CLAP_VERSION_REVISION ((uint32_t)0)
+#define CLAP_VERSION_REVISION ((uint32_t)1)
#define CLAP_VERSION_INIT {CLAP_VERSION_MAJOR, CLAP_VERSION_MINOR, CLAP_VERSION_REVISION}
static const CLAP_CONSTEXPR clap_version_t CLAP_VERSION = CLAP_VERSION_INIT;
diff --git a/src/main.cc b/src/main.cc
@@ -4,4 +4,9 @@
static const constexpr clap_version m = CLAP_VERSION;
-int main(int, char **) { return !clap_version_is_compatible(m); }
-\ No newline at end of file
+int main(int, char **) {
+ clap_param_info param_info;
+ param_info.module[0] = 'm';
+
+ return !clap_version_is_compatible(m);
+}
+\ No newline at end of file