diff --git a/cmake/enable_sdks.cmake b/cmake/enable_sdks.cmake index 5b60e44b..5a2e1f08 100644 --- a/cmake/enable_sdks.cmake +++ b/cmake/enable_sdks.cmake @@ -152,21 +152,17 @@ function(DefineCLAPASVST3Sources) list(REMOVE_ITEM vst3sources "${full_path_test_cpp}") endif() + if(WIN32) - set(os_wrappersources src/detail/os/windows.cpp) + set(os_wrappersources src/detail/vst3/os/windows.cpp) endif() if (APPLE) - set(os_wrappersources - src/detail/clap/mac_helpers.mm - src/detail/os/macos.mm - ) + set(os_wrappersources src/detail/vst3/os/macos.mm) endif() if(UNIX AND NOT APPLE) - set(os_wrappersources - src/detail/os/linux.cpp - ) + set(os_wrappersources src/detail/vst3/os/linux.cpp) endif() set(wrappersources_vst3 @@ -184,12 +180,6 @@ function(DefineCLAPASVST3Sources) src/detail/vst3/process.cpp src/detail/vst3/categories.h src/detail/vst3/categories.cpp - src/detail/sha1.h - src/detail/sha1.cpp - src/detail/clap/fsutil.h - src/detail/clap/fsutil.cpp - src/detail/os/osutil.h - src/detail/clap/automation.h ${os_wrappersources} CACHE STRING "Clap Wrapper Library Sources") @@ -333,7 +323,7 @@ function(target_add_vst3_wrapper) # clap-wrapper-extensions are PUBLIC, so a clap linking the library can access the clap-wrapper-extensions target_compile_definitions(${V3_TARGET}-clap-wrapper-vst3-lib PUBLIC -D${CLAP_WRAPPER_PLATFORM}=1) - target_link_libraries(${V3_TARGET}-clap-wrapper-vst3-lib PUBLIC clap-wrapper-extensions) + target_link_libraries(${V3_TARGET}-clap-wrapper-vst3-lib PUBLIC clap-wrapper-extensions clap-wrapper-shared-detail) target_compile_options(${V3_TARGET}-clap-wrapper-vst3-lib PRIVATE -DCLAP_SUPPORTS_ALL_NOTE_EXPRESSIONS=$,1,0> @@ -469,6 +459,8 @@ if (APPLE) SUBTYPE_CODE INSTRUMENT_TYPE + CLAP_TARGET_FOR_CONFIG + MACOS_EMBEDDED_CLAP_LOCATION ) cmake_parse_arguments(AUV2 "" "${oneValueArgs}" "" ${ARGN} ) @@ -477,8 +469,8 @@ if (APPLE) message(FATAL_ERROR "clap-wrapper: target_add_auv2_wrapper requires a target") endif() - if (NOT DEFINED AUV2_OUTPUT_NAME) - message(FATAL_ERROR "clap-wrapper: target_add_auv2_wrapper requires an output name") + if (NOT TARGET ${AUV2_TARGET}) + message(FATAL_ERROR "clap-wrapper: auv2-target must be a target") endif() if (NOT DEFINED AUV2_MANUFACTURER_NAME) @@ -489,18 +481,81 @@ if (APPLE) message(FATAL_ERROR "clap-wrapper: For now please specify AUV2 manufacturer code (4 chars)") endif() - if (NOT DEFINED AUV2_SUBTYPE_CODE) - message(FATAL_ERROR "clap-wrapper: For now please specify AUV2 subtype code (4 chars)") + if (NOT DEFINED AUV2_BUNDLE_VERSION) + message(WARNING "clap-wrapper: bundle version not defined. Chosing 1") + set(AUV2_BUNDLE_VERSION 1) endif() - if (NOT DEFINED AUV2_INSTRUMENT_TYPE) - message(WARNING "clap-wrapper: auv2 instrument type not specified. Using aumu") + # We need a build helper which ejects our config code for info-plist and entry points + set(bhtg ${AUV2_TARGET}-build-helper) + set(bhsc "${CLAP_WRAPPER_CMAKE_CURRENT_SOURCE_DIR}/src/detail/auv2/build-helper/") + add_executable(${bhtg} ${bhsc}/build-helper.cpp) + target_link_libraries(${bhtg} PRIVATE + clap-wrapper-shared-detail + macos_filesystem_support + "-framework Foundation" + "-framework CoreFoundation" + ) + set(bhtgoutdir "${CMAKE_CURRENT_BINARY_DIR}/${AUV2_TARGET}-build-helper-output") + add_custom_command(TARGET ${bhtg} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E echo "clap-wrapper: auv2 configuration output dir is ${bhtgoutdir}" + COMMAND ${CMAKE_COMMAND} -E make_directory "${bhtgoutdir}" + ) + + add_dependencies(${AUV2_TARGET} ${bhtg}) + + if (DEFINED AUV2_CLAP_TARGET_FOR_CONFIG) + set(clpt ${AUV2_CLAP_TARGET_FOR_CONFIG}) + message(STATUS "clap-wrapper: building auv2 based on target ${AUV2_CLAP_TARGET_FOR_CONFIG}") + get_property(ton TARGET ${clpt} PROPERTY LIBRARY_OUTPUT_NAME) + set(AUV2_OUTPUT_NAME "${ton}") + set(AUV2_SUBTYPE_CODE "Fooo") set(AUV2_INSTRUMENT_TYPE "aumu") + + add_dependencies(${AUV2_TARGET} ${clpt}) + add_dependencies(${bhtg} ${clpt}) + + add_custom_command( + TARGET ${bhtg} + POST_BUILD + WORKING_DIRECTORY ${bhtgoutdir} + BYPRODUCTS ${bhtgoutdir}/auv2_Info.plist ${bhtgoutdir}/generated_entrypoints.hxx + COMMAND $ --fromclap + "$" + "${AUV2_MANUFACTURER_CODE}" "${AUV2_MANUFACTURER_NAME}" + ) + else() + if (NOT DEFINED AUV2_OUTPUT_NAME) + message(FATAL_ERROR "clap-wrapper: target_add_auv2_wrapper requires an output name") + endif() + + if (NOT DEFINED AUV2_SUBTYPE_CODE) + message(FATAL_ERROR "clap-wrapper: For now please specify AUV2 subtype code (4 chars)") + endif() + + if (NOT DEFINED AUV2_INSTRUMENT_TYPE) + message(WARNING "clap-wrapper: auv2 instrument type not specified. Using aumu") + set(AUV2_INSTRUMENT_TYPE "aumu") + endif() + + add_custom_command( + TARGET ${bhtg} + POST_BUILD + WORKING_DIRECTORY ${bhtgoutdir} + BYPRODUCTS ${bhtgoutdir}/auv2_Info.plist ${bhtgoutdir}/generated_entrypoints.hxx + COMMAND $ --explicit + "${AUV2_OUTPUT_NAME}" "${AUV2_BUNDLE_VERSION}" + "${AUV2_INSTRUMENT_TYPE}" "${AUV2_SUBTYPE_CODE}" + "${AUV2_MANUFACTURER_CODE}" "${AUV2_MANUFACTURER_NAME}" + ) endif() - set(AUV2_INSTRUMENT_TYPE ${AUV2_INSTRUMENT_TYPE} PARENT_SCOPE) set(AUV2_MANUFACTURER_NAME ${AUV2_MANUFACTURER_NAME} PARENT_SCOPE) set(AUV2_MANUFACTURER_CODE ${AUV2_MANUFACTURER_CODE} PARENT_SCOPE) + configure_file(${bhsc}/auv2_infoplist_top.in + ${bhtgoutdir}/auv2_infoplist_top) + + set(AUV2_INSTRUMENT_TYPE ${AUV2_INSTRUMENT_TYPE} PARENT_SCOPE) set(AUV2_SUBTYPE_CODE ${AUV2_SUBTYPE_CODE} PARENT_SCOPE) message(STATUS "clap-wrapper: Adding AUV2 Wrapper to target ${AUV2_TARGET} generating '${AUV2_OUTPUT_NAME}.component'") @@ -512,13 +567,15 @@ if (APPLE) # is a placeholder. When we write it we will follow a similar # split trick as for the vst3, mostly (but AUV2 is a bit different # with info.plist and entrypoint-per-instance stuff) - target_sources(${AUV2_TARGET} PRIVATE ${CLAP_WRAPPER_CMAKE_CURRENT_SOURCE_DIR}/src/wrapasauv2.cpp) + target_sources(${AUV2_TARGET} PRIVATE + ${CLAP_WRAPPER_CMAKE_CURRENT_SOURCE_DIR}/src/wrapasauv2.cpp + ${bhtgoutdir}/generated_entrypoints.hxx) if (NOT TARGET ${AUV2_TARGET}-clap-wrapper-auv2-lib) # For now make this an interface add_library(${AUV2_TARGET}-clap-wrapper-auv2-lib INTERFACE ) - target_include_directories(${AUV2_TARGET}-clap-wrapper-auv2-lib INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include") + target_include_directories(${AUV2_TARGET}-clap-wrapper-auv2-lib INTERFACE "${bhtgoutdir}" "${CLAP_WRAPPER_CMAKE_CURRENT_SOURCE_DIR}/src") target_link_libraries(${AUV2_TARGET}-clap-wrapper-auv2-lib INTERFACE clap auv2_sdk) # clap-wrapper-extensions are PUBLIC, so a clap linking the library can access the clap-wrapper-extensions @@ -551,10 +608,15 @@ if (APPLE) MACOSX_BUNDLE_BUNDLE_NAME ${AUV2_OUTPUT_NAME} MACOSX_BUNDLE_BUNDLE_VERSION ${AUV2_BUNDLE_VERSION} MACOSX_BUNDLE_SHORT_VERSION_STRING ${AUV2_BUNDLE_VERSION} - MACOSX_BUNDLE_INFO_PLIST ${CLAP_WRAPPER_CMAKE_CURRENT_SOURCE_DIR}/cmake/auv2_Info.plist.in ) + # This is "PRE_BUILD" because the target is created at cmake time and we want to beat xcode signing in order + # it is *not* a MACOSX_BUNDLE_INFO_PLIST since that is a configure not build time concept so doesn't work + # with compile time generated files + add_custom_command(TARGET ${AUV2_TARGET} PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy ${bhtgoutdir}/auv2_Info.plist $/../Info.plist) + if (NOT ${CMAKE_GENERATOR} STREQUAL "Xcode") - add_custom_command(TARGET ${AUV2_TARGET} POST_BUILD + add_custom_command(TARGET ${AUV2_TARGET} PRE_BUILD WORKING_DIRECTORY $ COMMAND SetFile -a B "$.$") endif() @@ -579,6 +641,25 @@ if ( NOT TARGET clap-wrapper-extensions) target_include_directories(clap-wrapper-extensions INTERFACE include) endif() +add_library(clap-wrapper-shared-detail STATIC + src/detail/sha1.h + src/detail/sha1.cpp + src/detail/clap/fsutil.h + src/detail/clap/fsutil.cpp + src/detail/clap/automation.h + ) +target_compile_options(clap-wrapper-shared-detail PUBLIC -D${CLAP_WRAPPER_PLATFORM}=1) +target_link_libraries(clap-wrapper-shared-detail PUBLIC clap clap-wrapper-extensions) +target_include_directories(clap-wrapper-shared-detail PUBLIC libs/fmt) +target_include_directories(clap-wrapper-shared-detail PUBLIC src) + +if (APPLE) + target_sources(clap-wrapper-shared-detail PRIVATE + src/detail/clap/mac_helpers.mm + ) + target_link_libraries(clap-wrapper-shared-detail PRIVATE macos_filesystem_support) +endif() + if(${CMAKE_SIZEOF_VOID_P} EQUAL 4) # a 32 bit build is odd enough that it might be an error. Chirp. message(STATUS "clap-wrapper: configured as 32 bit build. Intentional?") diff --git a/libs/fmt/README.md b/libs/fmt/README.md new file mode 100644 index 00000000..f3ebbbac --- /dev/null +++ b/libs/fmt/README.md @@ -0,0 +1,3 @@ +This is a copy of the fmt:: library from github. License is in header files in +the "fmt" directory + diff --git a/src/detail/os/fmt/core.h b/libs/fmt/fmt/core.h similarity index 100% rename from src/detail/os/fmt/core.h rename to libs/fmt/fmt/core.h diff --git a/src/detail/os/fmt/format-inl.h b/libs/fmt/fmt/format-inl.h similarity index 100% rename from src/detail/os/fmt/format-inl.h rename to libs/fmt/fmt/format-inl.h diff --git a/src/detail/os/fmt/format.h b/libs/fmt/fmt/format.h similarity index 100% rename from src/detail/os/fmt/format.h rename to libs/fmt/fmt/format.h diff --git a/src/detail/os/fmt/ranges.h b/libs/fmt/fmt/ranges.h similarity index 100% rename from src/detail/os/fmt/ranges.h rename to libs/fmt/fmt/ranges.h diff --git a/src/detail/auv2/base_classes.h b/src/detail/auv2/base_classes.h new file mode 100644 index 00000000..9e86f0a9 --- /dev/null +++ b/src/detail/auv2/base_classes.h @@ -0,0 +1,61 @@ +/* + * document + */ + +#pragma once + +#include +#include +#include + +#include + +// ------------------------------------------------------------------------------------------------- + +class ClapWrapper_AUV2_Effect : public ausdk::AUEffectBase +{ + using Base = ausdk::AUEffectBase; + + public: + explicit ClapWrapper_AUV2_Effect(const std::string &clapid, int clapidx, + AudioComponentInstance ci) + : Base{ci, true} + { + std::cout << "[clap-wrapper] auv2: creating effect" << std::endl; + std::cout << "[clap-wrapper] auv2: id='" << clapid << "' index=" << clapidx << std::endl; + } +}; + +class ClapWrapper_AUV2_NoteEffect : public ausdk::AUMIDIEffectBase +{ + using Base = ausdk::AUMIDIEffectBase; + + public: + explicit ClapWrapper_AUV2_NoteEffect(const std::string &clapid, int clapidx, + AudioComponentInstance ci) + : Base{ci, true} + { + std::cout << "[clap-wrapper] auv2: creating note effect" << std::endl; + std::cout << "[clap-wrapper] auv2: id='" << clapid << "' index=" << clapidx << std::endl; + } +}; + +// ------------------------------------------------------------------------------------------------- + +class ClapWrapper_AUV2_Instrument : public ausdk::MusicDeviceBase +{ + using Base = ausdk::MusicDeviceBase; + + public: + explicit ClapWrapper_AUV2_Instrument(const std::string &clapid, int clapidx, + AudioComponentInstance ci) + : Base{ci, 0, 1} + { + std::cout << "[clap-wrapper] auv2: creating instrument" << std::endl; + std::cout << "[clap-wrapper] auv2: id='" << clapid << "' index=" << clapidx << std::endl; + } + + bool StreamFormatWritable(AudioUnitScope, AudioUnitElement) override { return true; } + + bool CanScheduleParameters() const override { return false; } +}; diff --git a/src/detail/auv2/build-helper/auv2_infoplist_top.in b/src/detail/auv2/build-helper/auv2_infoplist_top.in new file mode 100644 index 00000000..602adfd1 --- /dev/null +++ b/src/detail/auv2/build-helper/auv2_infoplist_top.in @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${AUV2_OUTPUT_NAME} + CFBundleIdentifier + ${AUV2_BUNDLE_VERSION} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${AUV2_OUTPUT_NAME} + CFBundlePackageType + BNDL + CFBundleShortVersionString + ${AUV2_BUNDLE_VERSION} + CFBundleSignature + ???? + CFBundleVersion + ${AUV2_BUNDLE_VERSION} + NSPrincipalClass + + NSHighResolutionCapable + diff --git a/src/detail/auv2/build-helper/build-helper.cpp b/src/detail/auv2/build-helper/build-helper.cpp new file mode 100644 index 00000000..988abb9e --- /dev/null +++ b/src/detail/auv2/build-helper/build-helper.cpp @@ -0,0 +1,262 @@ +#include +#include +#include + +#include "detail/clap/fsutil.h" + +#if MACOS_USE_STD_FILESYSTEM +#include +namespace fs = std::filesystem; +#else +#include "ghc/filesystem.hpp" +namespace fs = ghc::filesystem; +#endif + +struct auInfo +{ + std::string name, vers, type, subt, manu, manunm, clapid, desc; + + const std::string factoryBase{"wrapAsAUV2_inst"}; + + void writePListFragment(std::ostream &of, int idx) const + { + if (!clapid.empty()) + { + of << " \n"; + } + else + { + of << " \n"; + } + of << " \n" + << " name\n" + << " " << manunm << ": " << name << "\n" + << " description\n" + << " " << desc << "\n" + << " factoryFunction\n" + << " " << factoryBase << idx << "Factory" + << "\n" + << " manufacturer\n" + << " " << manu << "\n" + << " subtype\n" + << " " << subt << "\n" + << " type\n" + << " " << type << "\n" + << " version\n" + << " 1\n" + << " sandboxSafe\n" + << " \n" + << " resourceUsage\n" + << " \n" + << " network.client\n" + << " \n" + << " temporary-exception.files.all.read-write\n" + << " \n" + << " \n" + << " \n"; + } +}; + +bool buildUnitsFromClap(const std::string &clapfile, std::string &manu, std::string &manuName, std::vector &units) +{ + Clap::Library loader; + if (!loader.load(clapfile.c_str())) + { + std::cout << "[ERROR] library.load of clapfile failed" << std::endl; + return false; + } + + int idx{0}; + for (const auto *clapPlug : loader.plugins) + { + auto u = auInfo(); + u.name = clapPlug->name; + u.clapid = clapPlug->id; + u.vers = clapPlug->version; + u.desc = clapPlug->description; + + u.subt = "FIX" + std::to_string(idx++); + u.manu = manu; + u.manunm = manuName; + + + auto f = clapPlug->features[0]; + if (f == nullptr || strcmp(f, CLAP_PLUGIN_FEATURE_INSTRUMENT) == 0) + { + u.type = "aumu"; + } + else if (strcmp(f, CLAP_PLUGIN_FEATURE_AUDIO_EFFECT) == 0) + { + u.type = "aufx"; + } + else if (strcmp(f, CLAP_PLUGIN_FEATURE_NOTE_EFFECT) == 0) + { + u.type = "aumi"; + } + else + { + std::cout << "[WARNING] can't determine instrument type. Using aumu" << std::endl; + u.type = "aumu"; + } + + + units.push_back(u); + } + return true; +} + +int main(int argc, char **argv) +{ + if (argc < 2) + return 1; + + std::cout << "clap-wrapper: auv2 configuration tool starting\n"; + + std::vector units; + if (std::string(argv[1]) == "--explicit") + { + if (argc != 8) + { + std::cout << "[ERROR] Configuration incorrect. Got " << argc << " arguments in explicit" << std::endl; + return 5; + } + int idx = 2; + auInfo u; + u.name = std::string(argv[idx++]); + u.vers = std::string(argv[idx++]); + u.type = std::string(argv[idx++]); + u.subt = std::string(argv[idx++]); + u.manu = std::string(argv[idx++]); + u.manunm = std::string(argv[idx++]); + u.desc = u.name + " CLAP to AU Wrapper"; + + std::cout << " - single plugin explicit mode: " << u.name << " (" << u.type << "/" << u.subt << ")" << std::endl; + units.push_back(u); + } + else if (std::string(argv[1]) == "--fromclap") + { + if (argc != 5) + { + std::cout << "[ERROR] Configuration incorrect. Got " << argc << " arguments in fromclap" << std::endl; + return 5; + } + int idx = 2; + auto clapfile = std::string(argv[idx++]); + auto mcode = std::string(argv[idx++]); + auto mname = std::string(argv[idx++]); + + try { + auto p = fs::path{clapfile}; + // This is a hack for now - we get to the dll + p = p.parent_path().parent_path().parent_path(); + clapfile = p.u8string(); + } + catch (const fs::filesystem_error &e) + { + std::cout << "[ERROR] cant get path " << e.what() << std::endl; + return 3; + } + + std::cout << " - building information from CLAP directly\n" + << " - source clap: '" << clapfile << "'" << std::endl; + + if (!buildUnitsFromClap(clapfile, mcode, mname, units)) + { + std::cout << "[ERROR] Can't build units from CLAP" << std::endl; + return 4; + } + + if (units.empty()) + { + std::cout << "[ERROR] No units from clap file\n"; + return 5; + } + + std::cout << " - clap file produced " << units.size() << " units" << std::endl; + + } + else + { + std::cout << "[ERROR] Unknown Mode : " << argv[1] << std::endl; + return 2; + } + + std::cout << " - generating auv2_Info.plist from auv2_infoplist_top" << std::endl; + std::ifstream intop("auv2_infoplist_top"); + if (!intop.is_open()) + { + std::cerr << "[ERROR] Unable to open pre-generated file auv2_infoplist_top" << std::endl; + return 1; + } + + std::ofstream of("auv2_Info.plist"); + if (!of.is_open()) + { + std::cerr << "[ERROR] Unable to open output file auv2_Info.plist" << std::endl; + } + of << intop.rdbuf(); + + of << " AudioComponents\n \n"; + int idx{0}; + for (const auto &u : units) + { + std::cout << " + " << u.name << " (" << u.type << "/" << u.subt << ") by " << u.manunm + << " (" << u.manu << ")" << std::endl; + u.writePListFragment(of, idx++); + } + of << " \n"; + of << " \n\n"; + of.close(); + std::cout << " - auv2_Info.plist generated" << std::endl; + + std::cout << " - generating generated_entrypoints.hxx" << std::endl; + std::ofstream cppf("generated_entrypoints.hxx"); + if (!cppf.is_open()) + { + std::cout << "[ERROR] Unable to open generated_endpoints.hxx" << std::endl; + return 1; + } + + cppf << "#pragma once\n"; + cppf << "#include \"detail/auv2/base_classes.h\"\n\n"; + + idx = 0; + for (const auto &u : units) + { + auto on = u.factoryBase + std::to_string(idx); + + if (u.type == "aumu") + { + std::cout << " + " << u.name << " entry " << on << " from ClapWrapper_AUV2_Instrument" << std::endl; + cppf << "struct " << on << " : ClapWrapper_AUV2_Instrument {\n" + << " " << on << "(AudioComponentInstance ci) :\n" + << " ClapWrapper_AUV2_Instrument(\"" << u.clapid << "\", " << idx << ", ci) {}" + << "};\n" + << "AUSDK_COMPONENT_ENTRY(ausdk::AUMusicDeviceFactory, " << on << ");\n"; + } + else if (u.type == "aumi") + { + std::cout << " + " << u.name << " entry " << on << " from ClapWrapper_AUV2_NoteEffect" << std::endl; + cppf << "struct " << on << " : ClapWrapper_AUV2_NoteEffect {\n" + << " " << on << "(AudioComponentInstance ci) :\n" + << " ClapWrapper_AUV2_NoteEffect(\"" << u.clapid << "\", " << idx << ", ci) {}" + << "};\n" + << "AUSDK_COMPONENT_ENTRY(ausdk::AUBaseFactory , " << on << ");\n"; + } + else if (u.type == "aufx") + { + std::cout << " + " << u.name << " entry " << on << " from ClapWrapper_AUV2_Effect" << std::endl; + cppf << "struct " << on << " : ClapWrapper_AUV2_Effect {\n" + << " " << on << "(AudioComponentInstance ci) :\n" + << " ClapWrapper_AUV2_Effect(\"" << u.clapid << "\", " << idx << ", ci) {}" + << "};\n" + << "AUSDK_COMPONENT_ENTRY(ausdk::AUBaseFactory, " << on << ");\n"; + } + + idx++; + } + cppf.close(); + std::cout << " - generated_entrypoints.hxx generated" << std::endl; + + return 0; +} diff --git a/src/detail/clap/fsutil.h b/src/detail/clap/fsutil.h index 163ab408..597717e4 100644 --- a/src/detail/clap/fsutil.h +++ b/src/detail/clap/fsutil.h @@ -68,7 +68,6 @@ namespace Clap #if LIN return _handle != nullptr || _selfcontained; #endif - } private: diff --git a/src/detail/os/linux.cpp b/src/detail/vst3/os/linux.cpp similarity index 100% rename from src/detail/os/linux.cpp rename to src/detail/vst3/os/linux.cpp diff --git a/src/detail/os/macos.mm b/src/detail/vst3/os/macos.mm similarity index 99% rename from src/detail/os/macos.mm rename to src/detail/vst3/os/macos.mm index 945410f1..baaed75c 100644 --- a/src/detail/os/macos.mm +++ b/src/detail/vst3/os/macos.mm @@ -1,5 +1,6 @@ #define NOMINMAX 1 + /** * the macos helper * diff --git a/src/detail/os/osutil.h b/src/detail/vst3/os/osutil.h similarity index 100% rename from src/detail/os/osutil.h rename to src/detail/vst3/os/osutil.h diff --git a/src/detail/os/windows.cpp b/src/detail/vst3/os/windows.cpp similarity index 100% rename from src/detail/os/windows.cpp rename to src/detail/vst3/os/windows.cpp diff --git a/src/wrapasauv2.cpp b/src/wrapasauv2.cpp index 17e9ac2b..1505faa9 100644 --- a/src/wrapasauv2.cpp +++ b/src/wrapasauv2.cpp @@ -1,24 +1 @@ -// -// EmptyPlugIns.cpp -// EmptyPlugIns - this is just the empty plugin shell from the SDK for now -// - -#include - -#if !defined(CLAP_AUSDK_BASE_CLASS) -#define CLAP_AUSDK_BASE_CLASS ausdk::MusicDeviceBase -#endif - -struct wrapAsAUV2 : public CLAP_AUSDK_BASE_CLASS -{ - using Base = CLAP_AUSDK_BASE_CLASS; - - wrapAsAUV2(AudioComponentInstance ci) : Base{ci, 1, 1} {} - bool StreamFormatWritable(AudioUnitScope, AudioUnitElement) override { return true; } - bool CanScheduleParameters() const override { return false; } - - - -}; - -AUSDK_COMPONENT_ENTRY(ausdk::AUMusicDeviceFactory, wrapAsAUV2) +#include "generated_entrypoints.hxx" \ No newline at end of file diff --git a/src/wrapasvst3.h b/src/wrapasvst3.h index 5403e5d9..c36b539b 100644 --- a/src/wrapasvst3.h +++ b/src/wrapasvst3.h @@ -30,7 +30,7 @@ #endif #include "detail/vst3/plugview.h" -#include "detail/os/osutil.h" +#include "detail/vst3/os/osutil.h" #include "detail/clap/automation.h" #include