Skip to content

Commit

Permalink
msys2: Make OpenAL the default soundplayer (#6664)
Browse files Browse the repository at this point in the history
#changelog #sound
  • Loading branch information
oxillo authored Jan 24, 2021
1 parent 76d738c commit 3b790d2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
8 changes: 7 additions & 1 deletion libs/openFrameworks/utils/ofConstants.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ enum ofTargetPlatform{

#if defined( __WIN32__ ) || defined( _WIN32 )
#define TARGET_WIN32
#if defined(_MSC_VER)
#define TARGET_WINVS
#endif
#if defined(__MINGW32__) || defined(__MINGW64__)
#define TARGET_MINGW
#endif
#elif defined( __APPLE_CC__)
#define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
#include <TargetConditionals.h>
Expand Down Expand Up @@ -372,7 +378,7 @@ typedef TESSindex ofIndexType;
#if !defined(OF_SOUND_PLAYER_QUICKTIME) && !defined(OF_SOUND_PLAYER_FMOD) && !defined(OF_SOUND_PLAYER_OPENAL) && !defined(OF_SOUND_PLAYER_EMSCRIPTEN)
#ifdef TARGET_OF_IOS
#define OF_SOUND_PLAYER_IPHONE
#elif defined(TARGET_LINUX)
#elif defined(TARGET_LINUX) || defined(TARGET_MINGW)
#define OF_SOUND_PLAYER_OPENAL
#elif defined(TARGET_EMSCRIPTEN)
#define OF_SOUND_PLAYER_EMSCRIPTEN
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,14 @@ ifeq ($(OF_USE_POCO),1)
PLATFORM_DEFINES += POCO_STATIC
endif

ifeq ($(MSYSTEM),MINGW64)
PLATFORM_DEFINES += OF_SOUND_PLAYER_OPENAL
# Define the sound player to use : OpenAL is the default.
# Uncomment next line to use FMOD sound player
#PLATFORM_DEFINES += OF_SOUND_PLAYER_FMOD
ifeq ($(shell pkg-config libmpg123 --exists; echo $$?),0)
PLATFORM_DEFINES += OF_USING_MPG123
endif


##########################################################################################
# PLATFORM REQUIRED ADDON
# This is a list of addons required for this platform. This list is used to EXCLUDE
Expand Down Expand Up @@ -188,10 +191,6 @@ PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openssl/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/boost/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/glfw/%
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/curl/%
# FMOD is not supported on MINGW64
ifeq ($(MSYSTEM),MINGW64)
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/fmod/%
endif
#PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/glm/%


Expand Down Expand Up @@ -241,9 +240,7 @@ PLATFORM_PKG_CONFIG_LIBRARIES += glew
PLATFORM_PKG_CONFIG_LIBRARIES += glfw3
#PLATFORM_PKG_CONFIG_LIBRARIES += gstreamer-1.0
PLATFORM_PKG_CONFIG_LIBRARIES += libcurl
ifeq ($(findstring OF_SOUND_PLAYER_OPENAL, $(PLATFORM_DEFINES)),OF_SOUND_PLAYER_OPENAL)
PLATFORM_PKG_CONFIG_LIBRARIES += openal
endif
PLATFORM_PKG_CONFIG_LIBRARIES += openal
ifeq ($(findstring OF_USING_MPG123, $(PLATFORM_DEFINES)),OF_USING_MPG123)
PLATFORM_PKG_CONFIG_LIBRARIES += sndfile
PLATFORM_PKG_CONFIG_LIBRARIES += libmpg123
Expand Down

0 comments on commit 3b790d2

Please sign in to comment.