From: ehofman Date: Wed, 1 Feb 2006 13:27:36 +0000 (+0000) Subject: Add OpenAL 1.0 backwards compatibility and OS-X support. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=f2f960f4f46e1a59e41f27756934fc56065d423d;p=flightgear.git Add OpenAL 1.0 backwards compatibility and OS-X support. --- 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; }