diff options
author | shfil <filip.gawin@zoho.com> | 2020-12-08 16:40:57 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-08 16:40:57 +0100 |
commit | 95094e45af22c6667983b94180e29e05f9a71424 (patch) | |
tree | b50b879e9fcb77fb26aa4066077b07b5b2aa1945 /src | |
parent | 778d1381bb2dff5371782dbb773770f4adc17a35 (diff) | |
parent | 5a1ea7bcf579b616e349ed651c67e0f988592cbd (diff) |
Merge pull request #873 from madebr/openal_static
audio: define openal extensions in re3 owned namespace
Diffstat (limited to 'src')
-rw-r--r-- | src/audio/oal/oal_utils.cpp | 11 | ||||
-rw-r--r-- | src/audio/oal/oal_utils.h | 7 |
2 files changed, 18 insertions, 0 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 |