From f2f960f4f46e1a59e41f27756934fc56065d423d Mon Sep 17 00:00:00 2001 From: ehofman Date: Wed, 1 Feb 2006 13:27:36 +0000 Subject: [PATCH] Add OpenAL 1.0 backwards compatibility and OS-X support. --- tests/al-info.c | 30 ++++++++++++++++++++++-------- 1 file changed, 22 insertions(+), 8 deletions(-) diff --git a/tests/al-info.c b/tests/al-info.c index db411453f..69dc675b1 100644 --- a/tests/al-info.c +++ b/tests/al-info.c @@ -1,9 +1,24 @@ #include -#include -#include -#include +#ifdef __APPLE__ +# include +# include +#else +# include +# include +# include +#endif + +#ifndef AL_VERSION_1_1 +# ifdef __APPLE__ +# include +# include +#else +# include +# include +# endif +#endif #define MAX_DATA 16 @@ -13,9 +28,8 @@ int main() ALCint data[MAX_DATA]; ALCdevice *device = NULL; ALCcontext *context = NULL; - const ALCchar *s; + const unsigned char *s; ALCenum error; - ALCboolean ret; device = alcOpenDevice(NULL); if (device == NULL) @@ -46,7 +60,7 @@ int main() alcGetError(device); printf("\n"); - if (alcIsExtensionPresent(NULL, "ALC_ENUMERATION_EXT") == AL_TRUE) + if (alcIsExtensionPresent(NULL, (unsigned char *)"ALC_ENUMERATION_EXT") == AL_TRUE) { s = alcGetString(NULL, ALC_DEVICE_SPECIFIER); printf("ALC_DEVICE_SPECIFIER = \"%s\"\n", s); @@ -93,7 +107,7 @@ int main() } #endif - ret = alcCloseDevice(device); + alcCloseDevice(device); - return ret; + return 0; }