Skip to content

Commit

Permalink
Update deps and CI, remove juce usage and use AU from DPF
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Dec 13, 2024
1 parent 67cddef commit 41eb988
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 906 deletions.
19 changes: 9 additions & 10 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
target: [linux-arm64, linux-armhf, linux-riscv64, linux-x86_64]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: distrho/dpf-cmake-action@v1
Expand All @@ -27,7 +27,7 @@ jobs:
target: [macos-universal-10.15]
runs-on: macos-13
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: distrho/dpf-cmake-action@v1
Expand All @@ -43,16 +43,15 @@ jobs:
target: [win64]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: distrho/dpf-cmake-action@v1
with:
dpf_path: ./modules/dpf
lto: true
pawpaw: true
target: ${{ matrix.target }}
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ env.ARTIFACT_BASENAME }}-installer
path: |
Expand All @@ -75,12 +74,12 @@ jobs:
env:
EMSCRIPTEN_VERSION: 3.1.27
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Set up cache
id: cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/emsdk
Expand Down Expand Up @@ -134,7 +133,7 @@ jobs:
cd bin
brotli -k -q 11 *.*
zip -r -9 ../${{ github.event.repository.name }}-wasm-${{ matrix.target }}.zip $(ls *.*)
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: ${{ github.event.repository.name }}-wasm-${{ matrix.target }}
path: |
Expand All @@ -143,7 +142,7 @@ jobs:
pluginval:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: distrho/dpf-cmake-action@v1
Expand All @@ -154,7 +153,7 @@ jobs:
source:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: distrho/dpf-cmake-action@v1
Expand Down
35 changes: 1 addition & 34 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,14 @@ set(PREFER_RTNEURAL_XSIMD FALSE)
set(RTNEURAL_XSIMD ${PREFER_RTNEURAL_XSIMD} CACHE BOOL "Use RTNeural with this backend")
message("RTNEURAL_XSIMD in ${CMAKE_PROJECT_NAME} = ${RTNEURAL_XSIMD}, using processor type ${CMAKE_SYSTEM_PROCESSOR} and system name ${CMAKE_SYSTEM_NAME}")

if(APPLE)
set(PREFER_JUCE_EXTRA TRUE)
else()
set(PREFER_JUCE_EXTRA FALSE)
endif()
set(JUCE_EXTRA ${PREFER_JUCE_EXTRA} CACHE BOOL "Use JUCE for extra plugin formats")

add_subdirectory(modules/dpf)
add_subdirectory(modules/rtneural)

find_package(Threads REQUIRED)
set_property(GLOBAL PROPERTY INTERPROCEDURAL_OPTIMIZATION TRUE)

set(TARGETS clap lv2 vst2 vst3)

# hacky hack part1
if(JUCE_EXTRA)
set(TARGETS ${TARGETS} static)
endif()

dpf_add_plugin(AIDA-X
TARGETS ${TARGETS}
TARGETS au clap lv2 vst2 vst3
#NO_SHARED_RESOURCES
UI_TYPE opengl
USE_FILE_BROWSER
Expand Down Expand Up @@ -88,25 +74,6 @@ target_compile_definitions(dgl-opengl PUBLIC
NVG_FONT_TEXTURE_FLAGS=NVG_IMAGE_NEAREST
)

# hacky hack part 2
if(JUCE_EXTRA)
include(FetchContent)
FetchContent_Declare(JUCE
GIT_REPOSITORY https://github.com/DISTRHO/JUCE.git
GIT_TAG v6.1.6-distrho
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(JUCE)
add_subdirectory(src/jucewrapper)
if (APPLE)
add_dependencies(AIDA-X-JUCE_AU AIDA-X-static dgl-opengl)
target_compile_definitions(AIDA-X PUBLIC DISTRHO_PLUGIN_TARGET_STATIC_NAME="AudioUnit")
else()
add_dependencies(AIDA-X-JUCE_Standalone AIDA-X-static dgl-opengl)
target_compile_definitions(AIDA-X PUBLIC DISTRHO_PLUGIN_TARGET_STATIC_NAME="Standalone")
endif()
endif()

target_include_directories(AIDA-X PUBLIC
src
src/plugin
Expand Down
2 changes: 1 addition & 1 deletion modules/FFTConvolver
2 changes: 1 addition & 1 deletion modules/dpf
8 changes: 8 additions & 0 deletions src/DistrhoPluginCommon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,18 @@ static constexpr const uint32_t kVersionNumber = d_version(1, 1, 0);
#define DISTRHO_UI_FILE_BROWSER 1
#define DISTRHO_UI_USE_NANOVG 1

#define DISTRHO_PLUGIN_EXTRA_IO { 2, 2 },

#define DISTRHO_PLUGIN_CLAP_FEATURES "audio-effect", "multi-effects", "mono"
#define DISTRHO_PLUGIN_LV2_CATEGORY "lv2:SimulatorPlugin"
#define DISTRHO_PLUGIN_VST3_CATEGORIES "Fx|Dynamics|Mono"

#define DISTRHO_PLUGIN_BRAND_ID Aida
#define DISTRHO_PLUGIN_UNIQUE_ID aida

// needed because AIDA-X predates DPF support for VST3 brand uid
#define DPF_VST3_DONT_USE_BRAND_ID 1

#if DISTRHO_PLUGIN_VARIANT_STANDALONE && DISTRHO_PLUGIN_NUM_INPUTS == 0
# define AIDAX_WITH_AUDIOFILE 1
#else
Expand Down
20 changes: 8 additions & 12 deletions src/aidadsp-plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -290,6 +290,7 @@ class AidaDSPLoaderPlugin : public Plugin
LinearValueSmoother param2;
bool enabledLPF = true;
bool enabledDC = true;
bool isStereoAU = false;
bool paramFirstRun = true;
std::atomic<bool> resetMeters { true };
float tmpMeterIn, tmpMeterOut;
Expand Down Expand Up @@ -392,15 +393,6 @@ class AidaDSPLoaderPlugin : public Plugin
return kVersionNumber;
}

/**
Get the plugin unique Id.
This value is used by LADSPA, DSSI and VST plugin formats.
*/
int64_t getUniqueId() const override
{
return d_cconst('a', 'i', 'd', 'a');
}

/* -----------------------------------------------------------------------------------------------------------------
* Init */

Expand Down Expand Up @@ -1091,9 +1083,8 @@ class AidaDSPLoaderPlugin : public Plugin
tmpMeterOut = meterOut;
}

#if DISTRHO_PLUGIN_NUM_OUTPUTS == 2
std::memcpy(outputs[1], out, sizeof(float)*numSamples);
#endif
if (isStereoAU || DISTRHO_PLUGIN_NUM_OUTPUTS == 2)
std::memcpy(outputs[1], out, sizeof(float)*numSamples);
}

void bufferSizeChanged(const uint newBufferSize) override
Expand Down Expand Up @@ -1132,6 +1123,11 @@ class AidaDSPLoaderPlugin : public Plugin
}
}

void ioChanged(const uint16_t numInputs, const uint16_t numOutputs) override
{
isStereoAU = numInputs == 2 && numOutputs == 2;
}

// ----------------------------------------------------------------------------------------------------------------

/**
Expand Down
96 changes: 0 additions & 96 deletions src/jucewrapper/CMakeLists.txt

This file was deleted.

Loading

0 comments on commit 41eb988

Please sign in to comment.