diff options
| author | Steven Fuller <relnev@icculus.org> | 2017-05-05 12:00:00 +0200 |
|---|---|---|
| committer | Patryk Obara <dreamer.tan@gmail.com> | 2019-08-20 03:51:51 +0200 |
| commit | 5673c1665a2c6d7fdaf1a20d554bb135a20c7bc8 (patch) | |
| tree | ccf08c484f14d7c5e95fa7f645db2014d61ebb78 /src/openal.c | |
| parent | 0de664d0a886bcda45a0cd05551b6896c5c46ed0 (diff) | |
Import icculus.org release (2017-05-05)
Diffstat (limited to 'src/openal.c')
| -rw-r--r-- | src/openal.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/openal.c b/src/openal.c index 7018255..19bae84 100644 --- a/src/openal.c +++ b/src/openal.c @@ -3,8 +3,13 @@ #include <string.h> #include <math.h> +#if EMSCRIPTEN +#include <AL/al.h> +#include <AL/alc.h> +#else #include "al.h" #include "alc.h" +#endif #include "fixer.h" @@ -19,7 +24,7 @@ #include "dynblock.h" #include "stratdef.h" -#if defined( _MSC_VER ) +#if defined( _MSC_VERx ) #include <AL/eax.h> #endif @@ -47,7 +52,7 @@ static struct { unsigned int env_index; } SoundConfig; -#if defined(_MSC_VER) +#if defined(_MSC_VERx) // EAX1.0 #define EAX_REVERBMIX_USEDISTANCE -1.0F @@ -225,7 +230,7 @@ int PlatStartSoundSys() exit(1); } -#if defined(_MSC_VER) +#if defined(_MSC_VERx) EAX_pfPropSet = NULL; EAX_pfPropGet = NULL; @@ -870,7 +875,7 @@ void PlatUpdatePlayer() or[5] = -(float) ((Global_VDB_Ptr->VDB_Mat.mat32) / 65536.0F); } -#warning VELOCITY AND/OR OPENAL SETUP IS IN WRONG UNITS +#pragma message ("VELOCITY AND/OR OPENAL SETUP IS IN WRONG UNITS") static int useVel = 0; if (useVel!=0&&(AvP.PlayerType == I_Alien && DopplerShiftIsOn && NormalFrameTime)) { DYNAMICSBLOCK *dynPtr = Player->ObStrategyBlock->DynPtr; @@ -902,7 +907,7 @@ void PlatUpdatePlayer() alListenerfv (AL_POSITION, pos); } -#if defined( _MSC_VER ) +#if defined( _MSC_VERx ) if( SoundConfig.reverb_changed ) { // TODO: reverb handling } @@ -915,7 +920,7 @@ void PlatSetEnviroment(unsigned int env_index, float reverb_mix) fprintf(stderr, "OPENAL: PlatSetEnvironment(%d, %f)\n", env_index, reverb_mix); #endif -#if defined( _MSC_VER ) +#if defined( _MSC_VERx ) if( SoundConfig.env_index != env_index ) { // TODO: support the custom plain reverb |
