Skip to content

Commit

Permalink
Merge pull request #2157 from timothyschoen/fluidlite
Browse files Browse the repository at this point in the history
Fix [sfont~] info, fix play.file~ universal binary build
  • Loading branch information
porres committed Aug 26, 2024
2 parents 8f9912b + 321bea1 commit aaf34e9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
31 changes: 15 additions & 16 deletions Code_source/Compiled/audio/play.file~/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,18 @@ lib.name = play.file~

define forDarwin
cflags += -mmacosx-version-min=10.9
ffmpeg_config = --extra-cflags=-mmacosx-version-min=10.9 --extra-ldflags=-mmacosx-version-min=10.9
ffmpeg_cc="clang -arch x86_64 -arch arm64"
endef

define forLinux
ffmpeg_config = --enable-pic
ffmpeg_cc="$(CC)"
endef

define forWindows
ldlibs += -lbcrypt
ffmpeg_cc="$(CC)"
endef

LIBSAMPLERATE=../../../shared/libsamplerate
Expand All @@ -25,20 +37,6 @@ ifeq ($(extension),d_arm64)
override arch := arm64
endif

define forLinux
# ASM causes static linker issues on Linux
ffmpeg_config = --enable-pic --disable-asm
endef

define forWindows
ffmpeg_config = --disable-x86asm
ldlibs += -lbcrypt
endef

define forDarwin
ffmpeg_config = --disable-x86asm --extra-cflags=-mmacosx-version-min=10.9 --extra-ldflags=-mmacosx-version-min=10.9
endef

# Makefile based on pd-lib-builder by Katja Vetter, see: https://github.com/pure-data/pd-lib-builder
PDLIBBUILDER_DIR=../../../../pd-lib-builder/
include $(PDLIBBUILDER_DIR)/Makefile.pdlibbuilder
Expand All @@ -50,9 +48,10 @@ all_obj: ffmpeg play.file~ sfload
ffmpeg: $(FFMPEG_DIR)

$(FFMPEG_DIR):
rm -rf $(FFMPEG_DIR)
tar xjf $(FFMPEG_TAR)
cd $(FFMPEG_DIR) && ./configure --enable-static --disable-shared --enable-optimizations --disable-debug --disable-doc --disable-programs --disable-iconv --disable-avdevice --disable-postproc --disable-network --disable-everything --enable-avcodec --enable-avformat --enable-avutil --enable-swscale --enable-swresample --enable-decoder=mp3*,pcm*,aac*,flac,vorbis,opus --enable-parser=mpegaudio,aac --enable-demuxer=mp3,wav,aiff,flac,aac,ogg,pcm* --enable-filter=aresample --enable-protocol=file $(ffmpeg_config)
cd $(FFMPEG_DIR) && make
cd $(FFMPEG_DIR) && ./configure --disable-asm --enable-static --disable-shared --enable-optimizations --disable-debug --disable-doc --disable-programs --disable-iconv --disable-avdevice --disable-postproc --disable-network --disable-everything --enable-avcodec --enable-avformat --enable-avutil --enable-swscale --enable-swresample --enable-decoder=mp3*,pcm*,aac*,flac,vorbis,opus --enable-parser=mpegaudio,aac --enable-demuxer=mp3,wav,aiff,flac,aac,ogg,pcm* --enable-filter=aresample --enable-protocol=file $(ffmpeg_config)
cd $(FFMPEG_DIR) && make CC=$(ffmpeg_cc)

clean:
rm -rf $(FFMPEG_DIR)
Expand Down
3 changes: 2 additions & 1 deletion Code_source/Compiled/audio/sfont~/sfont~.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,8 @@ static void sfont_info(t_sfont *x){
post("Loaded soundfont: %s", fluid_sfont_get_name(x->x_sfont));
post("------------------- presets -------------------");
int i = 1;
fluid_preset_t* preset;
fluid_preset_t* preset = fluid_sfont_get_preset(x->x_sfont, 0, 0);
if(!preset) return;
fluid_sfont_iteration_start(x->x_sfont);
while((fluid_sfont_iteration_next(x->x_sfont, preset))){
int bank = preset->get_banknum(preset), pgm = preset->get_num(preset);
Expand Down

0 comments on commit aaf34e9

Please sign in to comment.