Skip to content

Commit

Permalink
Reworked libfaust action.
Browse files Browse the repository at this point in the history
  • Loading branch information
sletz committed Dec 24, 2024
1 parent c5dc7bf commit b7c9455
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 17 deletions.
11 changes: 5 additions & 6 deletions .github/workflows/libfaust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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"
Expand Down
2 changes: 0 additions & 2 deletions architecture/api/DspFaust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions build/MakeRelease.bat
Original file line number Diff line number Diff line change
@@ -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:\=/%"
Expand Down
2 changes: 1 addition & 1 deletion build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 0 additions & 2 deletions embedded/faustgen/src/faustgen_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@
#include "faustgen_factory.h"
#include "faustgen~.h"

#define LLVM_DSP

#include <faust/dsp/libfaust.h>
#include <faust/dsp/poly-dsp.h>

Expand Down
3 changes: 2 additions & 1 deletion embedded/faustgen/src/faustgen_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,10 @@
// Possibly compile with Interp backend
//#define INTERP_BACKEND

#include <faust/dsp/llvm-dsp.h>
#ifdef INTERP_BACKEND
#include <faust/dsp/interpreter-dsp.h>
#else
#include <faust/dsp/llvm-dsp.h>
#endif
#include <faust/dsp/dsp-adapter.h>
#include <faust/gui/SoundUI.h>
Expand Down
1 change: 1 addition & 0 deletions embedded/faustgen/src/faustgen~.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <Carbon/Carbon.h>
#endif

#include "faustgen_factory.h"
#include "faustgen~.h"

using namespace std;
Expand Down
4 changes: 2 additions & 2 deletions embedded/faustgen/src/faustgen~.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<faustgen> {

friend class faustgen_factory;
Expand Down
1 change: 0 additions & 1 deletion tools/benchmark/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b7c9455

Please sign in to comment.