clap

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

commit fe849ec8335a74b9ecfc90f970419c190fb6fb09
parent 7bdb16d69378ad7bd55ffe668053bb30a9d41e3e
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date:   Sat, 22 May 2021 23:46:44 +0200

Different approach

Diffstat:
MCMakeLists.txt | 2+-
Aexamples/gui-proxy/CMakeLists.txt | 6++++++
Cexamples/plugins/CMakeLists.txt -> examples/gui-proxy/proxy.cc | 0
Cexamples/plugins/CMakeLists.txt -> examples/gui-proxy/proxy.hh | 0
Aexamples/gui/CMakeLists.txt | 12++++++++++++
Aexamples/gui/main.cc | 5+++++
Mexamples/host/CMakeLists.txt | 2+-
Mexamples/plugins/CMakeLists.txt | 5+++++
Aexamples/plugins/clap-entry.cc | 29+++++++++++++++++++++++++++++
Rexamples/synaesthesis/plugin.cc -> examples/plugins/plugin.cc | 0
Rexamples/synaesthesis/plugin.hh -> examples/plugins/plugin.hh | 0
Dexamples/synaesthesis/CMakeLists.txt | 6------
Dexamples/synaesthesis/module.hh | 6------
Dexamples/synaesthesis/parameter.hh | 13-------------
Dexamples/synaesthesis/processor.hh | 16----------------
15 files changed, 59 insertions(+), 43 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt @@ -3,7 +3,7 @@ project(CLAP C CXX) set(ENABLE_CLAP_HOST FALSE CACHE BOOL "Enables the example host") set(ENABLE_CLAP_PLUGINS FALSE CACHE BOOL "Enables the example plugins") -set(ENABLE_CLAP_SYNAESTHESIS FALSE CACHE BOOL "Enables Synaesthesis, the plugin framework") +set(ENABLE_CLAP_GUI FALSE CACHE BOOL "Enables the plugin GUI framework") include_directories(include) diff --git a/examples/gui-proxy/CMakeLists.txt b/examples/gui-proxy/CMakeLists.txt @@ -0,0 +1,5 @@ +add_library(clap-gui-proxy STATIC + proxy.cc + proxy.hh +) +set_target_properties(clap-gui-proxy PROPERTIES POSITION_INDEPENDENT_CODE TRUE) +\ No newline at end of file diff --git a/examples/plugins/CMakeLists.txt b/examples/gui-proxy/proxy.cc diff --git a/examples/plugins/CMakeLists.txt b/examples/gui-proxy/proxy.hh diff --git a/examples/gui/CMakeLists.txt b/examples/gui/CMakeLists.txt @@ -0,0 +1,11 @@ +set(CMAKE_INCLUDE_CURRENT_DIR ON) +set(CMAKE_AUTOMOC ON) + +find_package(Qt6Core REQUIRED) +find_package(Qt6Widgets REQUIRED) + +add_executable(clap-gui + main.cc +) + +set_target_properties(clap-gui PROPERTIES CXX_STANDARD 17) +\ No newline at end of file diff --git a/examples/gui/main.cc b/examples/gui/main.cc @@ -0,0 +1,4 @@ +int main(int argc, char **argv) +{ + return 0; +} +\ No newline at end of file diff --git a/examples/host/CMakeLists.txt b/examples/host/CMakeLists.txt @@ -8,7 +8,7 @@ find_package(Qt6Widgets REQUIRED) #pkg_check_modules(PortAudio REQUIRED IMPORTED_TARGET portaudio-2.0) #pkg_check_modules(PortMidi REQUIRED IMPORTED_TARGET portmidi) -add_executable(clap-host EXCLUDE_FROM_ALL +add_executable(clap-host application.cc application.hh audio-settings.cc diff --git a/examples/plugins/CMakeLists.txt b/examples/plugins/CMakeLists.txt @@ -0,0 +1,4 @@ +add_library(clap-plugin SHARED + clap-entry.cc + plugin.cc + plugin.hh) +\ No newline at end of file diff --git a/examples/plugins/clap-entry.cc b/examples/plugins/clap-entry.cc @@ -0,0 +1,28 @@ +#include <clap/all.h> + +static bool clap_init(const char *plugin_path) { return true; } + +static void clap_deinit(void) {} + +static int32_t clap_get_plugin_count(void) +{ + return 0; +} + +static const clap_plugin_descriptor *clap_get_plugin_descriptor(int32_t index) +{ + return nullptr; +} + +static clap_plugin *clap_create_plugin(clap_host *host, const char *plugin_id) +{ + return nullptr; +} + +CLAP_EXPORT const struct clap_plugin_entry clap_plugin_entry = { + clap_init, + clap_deinit, + clap_get_plugin_count, + clap_get_plugin_descriptor, + clap_create_plugin, +}; +\ No newline at end of file diff --git a/examples/synaesthesis/plugin.cc b/examples/plugins/plugin.cc diff --git a/examples/synaesthesis/plugin.hh b/examples/plugins/plugin.hh diff --git a/examples/synaesthesis/CMakeLists.txt b/examples/synaesthesis/CMakeLists.txt @@ -1,5 +0,0 @@ -add_library(synaesthesis - plugin.cc - plugin.hh - parameter.hh -) -\ No newline at end of file diff --git a/examples/synaesthesis/module.hh b/examples/synaesthesis/module.hh @@ -1,5 +0,0 @@ -#pragma once - -namespace synaesthesis { - class Module {}; -} // namespace synaesthesis -\ No newline at end of file diff --git a/examples/synaesthesis/parameter.hh b/examples/synaesthesis/parameter.hh @@ -1,12 +0,0 @@ -#pragma once - -#include <clap/all.h> - -namespace synaesthesis { - class Parameter { - private: - clap_param_info info_; - clap_param_value value_; - clap_param_value modulated_value_; - }; -} // namespace synaesthesis -\ No newline at end of file diff --git a/examples/synaesthesis/processor.hh b/examples/synaesthesis/processor.hh @@ -1,15 +0,0 @@ -#pragma once - -#include <clap/all.h> - -namespace synaesthesis { - class Processor { - public: - Processor(int sampleRate); - - virtual void process(uint32_t voiceIndex) = 0; - - protected: - const int sampleRate_; - }; -} // namespace synaesthesis -\ No newline at end of file