From ffa894671e0ad52e7fb5e378b6fcadff079deb5f Mon Sep 17 00:00:00 2001 From: Yan Pujante Date: Sun, 8 Dec 2024 10:58:59 -0800 Subject: [PATCH] Fixed class name collision with Audio Unit --- README.md | 2 +- RELEASE.md | 4 ++++ audio-unit/auwrapper/CMakeLists.txt | 7 +++++-- jamba-test-plugin/audio-unit/audiounitconfig.h | 4 ++-- jamba.cmake | 2 +- 5 files changed, 13 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 1404a8a..20be58d 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ Check the [Quickstart](https://jamba.dev/quickstart/) section to getting started Latest Release -------------- -7.1.3 | 2024-12-01 | VST SDK 3.7.12+ +7.1.4 | 2024-12-08 | VST SDK 3.7.12+ [Release notes (local)](RELEASE.md) diff --git a/RELEASE.md b/RELEASE.md index 0d0cd86..f1c2a63 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -3,6 +3,10 @@ Release Notes {#release-notes} Check the [Requirements](https://jamba.dev/requirements/) documentation for information about which VST3 SDK Jamba supports and how to get it. +## [7.1.4 | 2024-12-08](https://github.com/pongasoft/jamba/tree/v7.1.4) + +* Fixed class name collision with Audio Unit + ## [7.1.3 | 2024-12-01](https://github.com/pongasoft/jamba/tree/v7.1.3) * Use `FetchContent_Populate`/`FetchContent_MakeAvailable` with `SOURCE_SUBDIR` option (see [CMake discussion](https://discourse.cmake.org/t/prevent-fetchcontent-makeavailable-to-execute-cmakelists-txt)) diff --git a/audio-unit/auwrapper/CMakeLists.txt b/audio-unit/auwrapper/CMakeLists.txt index 02fcdb2..723ae6c 100644 --- a/audio-unit/auwrapper/CMakeLists.txt +++ b/audio-unit/auwrapper/CMakeLists.txt @@ -27,8 +27,11 @@ if (MAC) "-framework Cocoa" "-framework CoreAudio") target_include_directories(${target} PRIVATE "${SMTG_COREAUDIO_SDK_PATH}/**") - string(MD5 AU_NAMESPACE_SUFFIX "${JAMBA_VST3_PLUGIN_TARGET}") - file(WRITE "${CMAKE_BINARY_DIR}/generated/aucocoaclassprefix.h" "#define SMTG_AU_NAMESPACE SMTGAUCocoa${AU_NAMESPACE_SUFFIX}_\n") + string(MAKE_C_IDENTIFIER "SMTG_AUCocoaUIBase_${JAMBA_VST3_PLUGIN_TARGET}" SMTG_AUCocoaUIBase_CLASS_NAME) + target_compile_definitions(${target} PUBLIC + SMTG_AUCocoaUIBase_CLASS_NAME=$,${SMTG_AUCocoaUIBase_CLASS_NAME}_Debug,${SMTG_AUCocoaUIBase_CLASS_NAME}> + CA_USE_AUDIO_PLUGIN_ONLY=0 + ) target_include_directories(${target} PRIVATE "${CMAKE_BINARY_DIR}/generated") else () message("* To enable building the AudioUnit wrapper, you need to use the Xcode generator") diff --git a/jamba-test-plugin/audio-unit/audiounitconfig.h b/jamba-test-plugin/audio-unit/audiounitconfig.h index 8e47e63..265a7a6 100644 --- a/jamba-test-plugin/audio-unit/audiounitconfig.h +++ b/jamba-test-plugin/audio-unit/audiounitconfig.h @@ -26,13 +26,13 @@ /* A manufacturer code for the audio unit, such as Aaud. This value must be exactly 4 alphanumeric characters. * This value should be unique across audio units of the same manufacturer * Manufacturer OSType should have at least one non-lower case character */ -#define kAUPluginManufacturer Jtp1 +#define kAUPluginManufacturer Psft // Definitions for the resource file #define kAudioUnitName "pongasoft: JambaTestPlugin" // same as kAUPluginName #define kAudioUnitDescription "JambaTestPlugin" // same as kAUPluginDescription #define kAudioUnitType 'aufx' // same as kAUPluginType #define kAudioUnitComponentSubType 'unkw' // same as kAUPluginSubType -#define kAudioUnitComponentManuf 'Jtp1' // same as kAUPluginManufacturer +#define kAudioUnitComponentManuf 'Psft' // same as kAUPluginManufacturer #define kAudioUnitCarbonView 1 // if 0 no Carbon view support will be added diff --git a/jamba.cmake b/jamba.cmake index d2b2be4..ded3872 100644 --- a/jamba.cmake +++ b/jamba.cmake @@ -46,7 +46,7 @@ endif() #------------------------------------------------------------------------ set(JAMBA_MAJOR_VERSION 7) set(JAMBA_MINOR_VERSION 1) -set(JAMBA_PATCH_VERSION 3) +set(JAMBA_PATCH_VERSION 4) execute_process(COMMAND git describe --long --dirty --abbrev=10 --tags RESULT_VARIABLE result OUTPUT_VARIABLE JAMBA_GIT_VERSION