From b7c94552b025a97dc7633ed6c82a4749e9371692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Letz?= Date: Tue, 24 Dec 2024 09:24:13 +0100 Subject: [PATCH] Reworked libfaust action. --- .github/workflows/libfaust.yml | 11 +++++------ architecture/api/DspFaust.cpp | 2 -- build/MakeRelease.bat | 5 +++-- build/Makefile | 2 +- embedded/faustgen/src/faustgen_factory.cpp | 2 -- embedded/faustgen/src/faustgen_factory.h | 3 ++- embedded/faustgen/src/faustgen~.cpp | 1 + embedded/faustgen/src/faustgen~.h | 4 ++-- tools/benchmark/Makefile | 1 - 9 files changed, 14 insertions(+), 17 deletions(-) diff --git a/.github/workflows/libfaust.yml b/.github/workflows/libfaust.yml index 0a60e445a5..725bfc55d8 100644 --- a/.github/workflows/libfaust.yml +++ b/.github/workflows/libfaust.yml @@ -155,14 +155,14 @@ jobs: matrix: include: - name: arm64 - os: macos-12 + os: macos-14 llvm-url: https://github.com/grame-cncm/faust/releases/download/2.59.5-llvm/llvm-15.0.7-macos10.15-arm64.zip ARCHS: "-arch arm64" CMAKE_OSX_ARCHITECTURES: arm64 HOST: aarch64-apple-darwin ENABLE_MPEG: OFF - name: x64 - os: macos-12 + os: macos-13 llvm-url: https://github.com/grame-cncm/faust/releases/download/2.59.5-llvm/llvm-15.0.7-macos10.15-x86_64.zip ARCHS: "-arch x86_64" CMAKE_OSX_ARCHITECTURES: x86_64 @@ -178,7 +178,7 @@ jobs: - name: Build libmicrohttpd run: | - curl -L https://mirrors.sarata.com/gnu/libmicrohttpd/libmicrohttpd-0.9.76.tar.gz -o libmicrohttpd-0.9.76.tar.gz + curl -L https://mirror.cyberbits.eu/gnu/libmicrohttpd/libmicrohttpd-0.9.76.tar.gz -o libmicrohttpd-0.9.76.tar.gz tar -xvf libmicrohttpd-0.9.76.tar.gz mv libmicrohttpd-0.9.76 libmicrohttpd cd libmicrohttpd @@ -193,10 +193,9 @@ jobs: - name: Brew install requirements (arm64) if: ${{ endsWith( matrix.name, 'arm64') }} # todo: should we bother with brew update? - # todo: add mpg123 so that faustgen and other projects can decode mp3 run: | brew update - PACKAGES=(ncurses gtk+ liblo lame flac libogg libtool libvorbis opus) + PACKAGES=(ncurses gtk+ liblo lame flac libogg libtool libvorbis opus mpg123) DEPS=($(brew deps --union --topological $(echo $PACKAGES) | tr '\n' ' ')) PACKAGES=("${DEPS[@]}" "${PACKAGES[@]}") export HOMEBREW_NO_INSTALL_CLEANUP=1 @@ -205,7 +204,7 @@ jobs: for PACKAGE in "${PACKAGES[@]}" do echo "Fetching bottle: $PACKAGE" - response=$(brew fetch --bottle-tag=arm64_monterey $PACKAGE 2>&1) + response=$(brew fetch --bottle-tag=arm64_ventura $PACKAGE 2>&1) package_path=$(echo $response | sed -n 's/.*\:\ \(.*\.tar\.gz\).*/\1/p') package_path=$(echo "$package_path" | xargs) echo "Package Path: $package_path" diff --git a/architecture/api/DspFaust.cpp b/architecture/api/DspFaust.cpp index 3d58200f5f..31645a580b 100644 --- a/architecture/api/DspFaust.cpp +++ b/architecture/api/DspFaust.cpp @@ -258,8 +258,6 @@ audio* DspFaust::createDriver(int sample_rate, int buffer_size, bool auto_connec // JUCE audio device has its own sample rate and buffer size fprintf(stderr, "You are setting 'sample_rate' and 'buffer_size' with a driver that does not need it !\n"); audio* driver = new juceaudio(); -#elif DUMMY_DRIVER - audio* driver = new dummyaudio(sample_rate, buffer_size); #elif ESP32_DRIVER audio* driver = new esp32audio(sample_rate, buffer_size); #elif DUMMY_DRIVER diff --git a/build/MakeRelease.bat b/build/MakeRelease.bat index 567e3d1c93..36453835e4 100644 --- a/build/MakeRelease.bat +++ b/build/MakeRelease.bat @@ -1,7 +1,8 @@ @echo off -SET VERSION=2.77.3 -SET FAUSTGENVERSION=1.7" + +SET VERSION=2.77.3 +SET FAUSTGENVERSION=1.73 SET MYPATH=%cd% SET "MYPATH=%MYPATH:\=/%" diff --git a/build/Makefile b/build/Makefile index 8d7fa96423..a4ec91d6ed 100644 --- a/build/Makefile +++ b/build/Makefile @@ -226,7 +226,7 @@ macpack: package/README.html $(MAKE) mactools FAUSTDIR=../../build/$(PACK)/Faust-$(VERSION) cp package/INSTALL.html $(PACK) cp package/README.html $(PACK) - hdiutil create Faust-$(VERSION).dmg -fs HFS+ -srcfolder $(PACK) -format UDBZ -ov + for i in {1..30}; do hdiutil create Faust-$(VERSION).dmg -fs HFS+ -srcfolder $(PACK) -format UDBZ -ov -quiet && break; sleep 2; done mactools: $(MAKE) -C ../tools/benchmark FAUSTDIR=$(FAUSTDIR) TARGETS="dynamic-faust faustbench-llvm interp-tracer" LLVM="$(LLVM)" ARCHS="$(ARCHS)" USE_STATIC_SNDFILE=$(USE_STATIC_SNDFILE) diff --git a/embedded/faustgen/src/faustgen_factory.cpp b/embedded/faustgen/src/faustgen_factory.cpp index cb9528ad76..5d7ba34a90 100644 --- a/embedded/faustgen/src/faustgen_factory.cpp +++ b/embedded/faustgen/src/faustgen_factory.cpp @@ -32,8 +32,6 @@ #include "faustgen_factory.h" #include "faustgen~.h" -#define LLVM_DSP - #include #include diff --git a/embedded/faustgen/src/faustgen_factory.h b/embedded/faustgen/src/faustgen_factory.h index c33d3c59c7..ff633775a4 100644 --- a/embedded/faustgen/src/faustgen_factory.h +++ b/embedded/faustgen/src/faustgen_factory.h @@ -45,9 +45,10 @@ // Possibly compile with Interp backend //#define INTERP_BACKEND -#include #ifdef INTERP_BACKEND #include +#else +#include #endif #include #include diff --git a/embedded/faustgen/src/faustgen~.cpp b/embedded/faustgen/src/faustgen~.cpp index d2b50538c0..ae70648948 100644 --- a/embedded/faustgen/src/faustgen~.cpp +++ b/embedded/faustgen/src/faustgen~.cpp @@ -29,6 +29,7 @@ #include #endif +#include "faustgen_factory.h" #include "faustgen~.h" using namespace std; diff --git a/embedded/faustgen/src/faustgen~.h b/embedded/faustgen/src/faustgen~.h index 5206a5a770..634423ab8a 100644 --- a/embedded/faustgen/src/faustgen~.h +++ b/embedded/faustgen/src/faustgen~.h @@ -57,12 +57,12 @@ #include "jgraphics.h" #include "ext_drag.h" -#include "faustgen_factory.h" - //==================== // Faust DSP Instance //==================== +class faustgen_factory; + class faustgen : public MspCpp5 { friend class faustgen_factory; diff --git a/tools/benchmark/Makefile b/tools/benchmark/Makefile index 5986018620..6dc89d43fa 100644 --- a/tools/benchmark/Makefile +++ b/tools/benchmark/Makefile @@ -18,7 +18,6 @@ endif FASTMATH = $(INC)/faust/dsp/fastmath.cpp LIBS := $(LIB)/libfaust.a LIB_FLAGS := /opt/local/lib -FASTMATH = $(shell $(FAUST) -includedir)/faust/dsp/fastmath.cpp ifndef LLVM LLVM := `llvm-config --link-static --ldflags --libs all --system-libs` endif