2002-08-30 17:30:40 -04:00
|
|
|
/*
|
2004-06-12 16:28:34 -04:00
|
|
|
* Copyright (c) 2002-2004 LWJGL Project
|
2002-08-30 17:30:40 -04:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions are
|
|
|
|
* met:
|
|
|
|
*
|
|
|
|
* * Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
*
|
|
|
|
* * Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
2004-06-12 16:28:34 -04:00
|
|
|
* * Neither the name of 'LWJGL' nor the names of
|
2002-08-30 17:30:40 -04:00
|
|
|
* its contributors may be used to endorse or promote products derived
|
|
|
|
* from this software without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
|
|
|
|
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
|
|
|
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
|
|
|
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
|
|
|
|
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
|
|
|
|
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
|
|
|
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
|
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _AL_TEST_H
|
|
|
|
#define _AL_TEST_H
|
|
|
|
|
2002-12-14 08:37:46 -05:00
|
|
|
#ifdef _WIN32
|
2002-08-30 17:30:40 -04:00
|
|
|
#include <windows.h>
|
2002-12-14 08:37:46 -05:00
|
|
|
#endif
|
2003-09-07 09:28:19 -04:00
|
|
|
|
2003-09-08 10:40:46 -04:00
|
|
|
#include <jni.h>
|
2004-03-09 06:03:10 -05:00
|
|
|
#include "common_tools.h"
|
|
|
|
|
2002-12-14 07:49:16 -05:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2004-11-03 07:10:20 -05:00
|
|
|
#if defined(_WIN32)
|
2002-12-14 07:49:16 -05:00
|
|
|
#ifdef _OPENAL32LIB
|
|
|
|
#define ALCAPI __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define ALCAPI __declspec(dllimport)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#define ALCAPIENTRY __cdecl
|
2002-11-26 22:01:23 -05:00
|
|
|
#else
|
2004-11-03 07:10:20 -05:00
|
|
|
#define ALCAPI
|
|
|
|
#define ALCAPIENTRY
|
2002-12-14 08:52:25 -05:00
|
|
|
|
2002-11-28 14:17:55 -05:00
|
|
|
#endif
|
2002-12-14 07:49:16 -05:00
|
|
|
|
|
|
|
#ifdef _WIN32
|
|
|
|
#ifdef _OPENAL32LIB
|
|
|
|
#define ALAPI __declspec(dllexport)
|
|
|
|
#else
|
|
|
|
#define ALAPI __declspec(dllimport)
|
|
|
|
#endif
|
|
|
|
#define ALAPIENTRY __cdecl
|
|
|
|
#define AL_CALLBACK
|
|
|
|
#else
|
|
|
|
#define ALAPI
|
2002-12-14 08:37:46 -05:00
|
|
|
#define ALAPIENTRY
|
2002-12-14 07:49:16 -05:00
|
|
|
#define AL_CALLBACK
|
2002-11-28 14:36:09 -05:00
|
|
|
#endif
|
2002-12-14 07:49:16 -05:00
|
|
|
|
|
|
|
#define INITGUID
|
|
|
|
#define OPENAL
|
|
|
|
|
2005-10-10 08:50:10 -04:00
|
|
|
// ALC typedefs
|
|
|
|
typedef struct ALCdevice_struct ALCdevice;
|
|
|
|
typedef struct ALCcontext_struct ALCcontext;
|
|
|
|
/** 8-bit boolean */
|
|
|
|
typedef char ALCboolean;
|
|
|
|
|
|
|
|
/** character */
|
|
|
|
typedef char ALCchar;
|
|
|
|
|
|
|
|
/** signed 8-bit 2's complement integer */
|
|
|
|
typedef char ALCbyte;
|
|
|
|
|
|
|
|
/** unsigned 8-bit integer */
|
|
|
|
typedef unsigned char ALCubyte;
|
|
|
|
|
|
|
|
/** signed 16-bit 2's complement integer */
|
|
|
|
typedef short ALCshort;
|
|
|
|
|
|
|
|
/** unsigned 16-bit integer */
|
|
|
|
typedef unsigned short ALCushort;
|
|
|
|
|
|
|
|
/** signed 32-bit 2's complement integer */
|
|
|
|
typedef int ALCint;
|
|
|
|
|
|
|
|
/** unsigned 32-bit integer */
|
|
|
|
typedef unsigned int ALCuint;
|
|
|
|
|
|
|
|
/** non-negative 32-bit binary integer size */
|
|
|
|
typedef int ALCsizei;
|
|
|
|
|
|
|
|
/** enumerated 32-bit value */
|
|
|
|
typedef int ALCenum;
|
|
|
|
|
|
|
|
/** 32-bit IEEE754 floating-point */
|
|
|
|
typedef float ALCfloat;
|
|
|
|
|
|
|
|
/** 64-bit IEEE754 floating-point */
|
|
|
|
typedef double ALCdouble;
|
|
|
|
|
|
|
|
/** void type (for opaque pointers only) */
|
|
|
|
typedef void ALCvoid;
|
|
|
|
|
|
|
|
// AL typedefs
|
|
|
|
/** 8-bit boolean */
|
|
|
|
typedef char ALboolean;
|
|
|
|
|
|
|
|
/** character */
|
|
|
|
typedef char ALchar;
|
|
|
|
|
|
|
|
/** signed 8-bit 2's complement integer */
|
|
|
|
typedef char ALbyte;
|
|
|
|
|
|
|
|
/** unsigned 8-bit integer */
|
|
|
|
typedef unsigned char ALubyte;
|
|
|
|
|
|
|
|
/** signed 16-bit 2's complement integer */
|
|
|
|
typedef short ALshort;
|
|
|
|
|
|
|
|
/** unsigned 16-bit integer */
|
|
|
|
typedef unsigned short ALushort;
|
|
|
|
|
|
|
|
/** signed 32-bit 2's complement integer */
|
|
|
|
typedef int ALint;
|
|
|
|
|
|
|
|
/** unsigned 32-bit integer */
|
|
|
|
typedef unsigned int ALuint;
|
|
|
|
|
|
|
|
/** non-negative 32-bit binary integer size */
|
|
|
|
typedef int ALsizei;
|
|
|
|
|
|
|
|
/** enumerated 32-bit value */
|
|
|
|
typedef int ALenum;
|
|
|
|
|
|
|
|
/** 32-bit IEEE754 floating-point */
|
|
|
|
typedef float ALfloat;
|
|
|
|
|
|
|
|
/** 64-bit IEEE754 floating-point */
|
|
|
|
typedef double ALdouble;
|
|
|
|
|
|
|
|
/** void type (for opaque pointers only) */
|
|
|
|
typedef void ALvoid;
|
|
|
|
|
2006-01-16 10:54:50 -05:00
|
|
|
void* extal_GetProcAddress(const char* function);
|
2006-01-16 10:58:23 -05:00
|
|
|
void extal_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions);
|
2005-10-10 08:50:10 -04:00
|
|
|
|
2006-01-16 10:54:50 -05:00
|
|
|
/* Platform dependent functions */
|
|
|
|
void *NativeGetFunctionPointer(const char *function);
|
|
|
|
bool tryLoadLibrary(JNIEnv *env, jstring path);
|
|
|
|
void UnLoadOpenAL();
|
2004-03-10 03:42:40 -05:00
|
|
|
|
2002-12-14 07:49:16 -05:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2002-12-14 08:37:46 -05:00
|
|
|
#endif
|