Skip to content

Commit

Permalink
Disable ALUT by default (it's a seperate, implementation-independent …
Browse files Browse the repository at this point in the history
…library

 now, at openal.org).
  • Loading branch information
icculus committed Jan 17, 2006
1 parent aeb5279 commit e959b5d
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 2 deletions.
14 changes: 12 additions & 2 deletions osx/ALut.c
Expand Up @@ -17,10 +17,18 @@
* Boston, MA 02111-1307, USA.
* Or go to http://www.gnu.org/copyleft/lgpl.html
*/

#include "alInternal.h"

// !!! FIXME: This needs updating.
// ALUT is being seperated out now in the official openal implementation.
// You should use their external libalut with this AL, too.
// But if you want this old, crusty support, perhaps for binary
// compatibility, toggle SUPPORTS_ALUT to "true" in the Makefile.
#if !SUPPORTS_ALUT
int NO_ALUT_SUPPORT_IN_THIS_OPENAL_BUILD = 1;
#else

// !!! FIXME: This all needs updating.

void convert_c2pstr(char *string);
void SwapWords(unsigned int *puint);
Expand Down Expand Up @@ -400,5 +408,7 @@ ALUTAPI ALvoid ALUTAPIENTRY alutUnloadWAV(ALenum format,ALvoid *data,ALsizei siz
#pragma export off
#endif

#endif // SUPPORTS_ALUT

// end of ALut.c ...

3 changes: 3 additions & 0 deletions osx/alExtension.c
Expand Up @@ -273,11 +273,14 @@ ALAPI ALvoid * ALAPIENTRY alGetProcAddress(const ALubyte *fname)
PROC_ADDRESS(alDopplerFactor);
PROC_ADDRESS(alDopplerVelocity);
PROC_ADDRESS(alDistanceModel);

#if SUPPORTS_ALUT
PROC_ADDRESS(alutInit);
PROC_ADDRESS(alutExit);
PROC_ADDRESS(alutLoadWAVFile);
PROC_ADDRESS(alutLoadWAVMemory);
PROC_ADDRESS(alutUnloadWAV);
#endif

return NULL;
} // alGetProcAddress
Expand Down
3 changes: 3 additions & 0 deletions osx/alInternal.h
Expand Up @@ -39,7 +39,10 @@
#define ALUT_CALLBACK
#include "al.h"
#include "alc.h"

#if SUPPORTS_ALUT
#include "alut.h"
#endif

// CoreAudio and other Apple headers...
#if MACOSX
Expand Down
5 changes: 5 additions & 0 deletions osx/makefile
Expand Up @@ -36,6 +36,7 @@ USE_G4_OPCODES := false
USE_G5_OPCODES := false
USE_CCACHE := false
USE_IBM_COMPILER := false
SUPPORT_ALUT := false
SUPPORT_ALC_ENUMERATION_EXT := true
SUPPORT_ALC_EXT_CAPTURE := false
SUPPORT_ALC_EXT_DISCONNECT := false
Expand Down Expand Up @@ -125,6 +126,10 @@ ifeq ($(strip $(USE_VBAP)),true)
SRCS += alVBAP.c
endif

ifeq ($(strip $(SUPPORT_ALUT)),true)
CFLAGS += -DSUPPORTS_ALUT=1
endif

ifeq ($(strip $(SUPPORT_ALC_ENUMERATION_EXT)),true)
CFLAGS += -DSUPPORTS_ALC_ENUMERATION_EXT=1
endif
Expand Down

0 comments on commit e959b5d

Please sign in to comment.