1
1
Fork 0
mirror of https://github.com/QB64-Phoenix-Edition/QB64pe.git synced 2024-07-04 04:50:22 +00:00

Merge pull request #391 from a740g/macOS-audio-fix

Avoid miniaudio runtime linking on macOS
This commit is contained in:
Samuel Gomes 2023-10-10 04:45:15 +05:30 committed by GitHub
commit 16074c2260
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View file

@ -296,7 +296,7 @@ ifneq ($(filter y,$(DEP_AUDIO_MINIAUDIO)),)
CXXLIBS += -lwinmm -lksguid -ldxguid -lole32
endif
ifeq ($(OS),osx)
CXXLIBS += -framework CoreFoundation -framework CoreAudio -framework CoreMIDI -framework AudioUnit -framework AudioToolbox
CXXLIBS += -lpthread -lm -framework CoreFoundation -framework CoreAudio -framework CoreMIDI -framework AudioUnit -framework AudioToolbox
endif
QBLIB_NAME := $(addsuffix 1,$(QBLIB_NAME))

View file

@ -12,6 +12,11 @@
// Enable Ogg Vorbis decoding
#define STB_VORBIS_HEADER_ONLY
#include "extras/stb_vorbis.c"
// Due to the way miniaudio links to macOS frameworks at runtime, the application may not pass Apple's notarization process :(
// So, we will avoid runtime linking on macOS. See this discussion for more info: https://github.com/mackron/miniaudio/issues/203
#ifdef __APPLE__
# define MA_NO_RUNTIME_LINKING
#endif
// The main miniaudio header
#define MINIAUDIO_IMPLEMENTATION
#include "miniaudio.h"