diff options
author | aap <aap@papnet.eu> | 2020-12-19 17:27:01 +0100 |
---|---|---|
committer | aap <aap@papnet.eu> | 2020-12-19 17:27:01 +0100 |
commit | 2a51e1da0456e9b7397562102d3241e5c3ddbd6e (patch) | |
tree | 308cfd8f4e23e713fec89e041d92ecc96ba462c5 /src/audio/oal | |
parent | anim compression (diff) | |
parent | Merge pull request #891 from Nick007J/miami (diff) | |
download | re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.gz re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.bz2 re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.lz re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.xz re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.tar.zst re3-2a51e1da0456e9b7397562102d3241e5c3ddbd6e.zip |
Diffstat (limited to 'src/audio/oal')
-rw-r--r-- | src/audio/oal/oal_utils.cpp | 11 | ||||
-rw-r--r-- | src/audio/oal/oal_utils.h | 7 | ||||
-rw-r--r-- | src/audio/oal/stream.cpp | 6 |
3 files changed, 22 insertions, 2 deletions
diff --git a/src/audio/oal/oal_utils.cpp b/src/audio/oal/oal_utils.cpp index e16de572..e4cb0b77 100644 --- a/src/audio/oal/oal_utils.cpp +++ b/src/audio/oal/oal_utils.cpp @@ -3,6 +3,14 @@ #ifdef AUDIO_OAL +/* + * When linking to a static openal-soft library, + * the extension function inside the openal library conflict with the variables here. + * Therefore declare these re3 owned symbols in a private namespace. + */ + +namespace re3_openal { + LPALGENEFFECTS alGenEffects; LPALDELETEEFFECTS alDeleteEffects; LPALISEFFECT alIsEffect; @@ -37,6 +45,9 @@ LPALGETFILTERIV alGetFilteriv; LPALGETFILTERF alGetFilterf; LPALGETFILTERFV alGetFilterfv; +} + +using namespace re3_openal; void EFXInit() { diff --git a/src/audio/oal/oal_utils.h b/src/audio/oal/oal_utils.h index b89ccf36..f0fa090a 100644 --- a/src/audio/oal/oal_utils.h +++ b/src/audio/oal/oal_utils.h @@ -11,6 +11,8 @@ void EFX_Set(ALuint effect, const EAXLISTENERPROPERTIES *props); void EAX3_SetReverbMix(ALuint filter, float mix); void SetEffectsLevel(ALuint uiFilter, float level); +namespace re3_openal { + extern LPALGENEFFECTS alGenEffects; extern LPALDELETEEFFECTS alDeleteEffects; extern LPALISEFFECT alIsEffect; @@ -44,4 +46,9 @@ extern LPALGETFILTERI alGetFilteri; extern LPALGETFILTERIV alGetFilteriv; extern LPALGETFILTERF alGetFilterf; extern LPALGETFILTERFV alGetFilterfv; + +} + +using namespace re3_openal; + #endif diff --git a/src/audio/oal/stream.cpp b/src/audio/oal/stream.cpp index 06a38c29..3a1f748f 100644 --- a/src/audio/oal/stream.cpp +++ b/src/audio/oal/stream.cpp @@ -10,13 +10,15 @@ #ifdef _WIN32 #pragma comment( lib, "libsndfile-1.lib" ) #pragma comment( lib, "libmpg123-0.lib" ) -#else -#include "crossplatform.h" #endif #include <sndfile.h> #include <mpg123.h> #endif +#ifndef _WIN32 +#include "crossplatform.h" +#endif + #ifndef AUDIO_OPUS class CSndFile : public IDecoder { |