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
|
|
|
|
|
|
|
#ifdef _X11
|
2002-12-14 07:49:16 -05:00
|
|
|
#include <AL/altypes.h>
|
|
|
|
#include <AL/alctypes.h>
|
2003-09-08 10:40:46 -04:00
|
|
|
#endif
|
|
|
|
#ifdef _WIN32
|
2003-09-07 09:28:19 -04:00
|
|
|
#include <altypes.h>
|
|
|
|
#include <alctypes.h>
|
|
|
|
#endif
|
2004-11-02 10:51:09 -05:00
|
|
|
#ifdef _MACOSX
|
2004-11-03 07:10:20 -05:00
|
|
|
#include <AL/alctypes.h>
|
|
|
|
#include <AL/altypes.h>
|
2003-09-08 10:40:46 -04:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#include <jni.h>
|
2004-03-09 06:03:10 -05:00
|
|
|
#include "common_tools.h"
|
|
|
|
|
2004-07-04 05:13:19 -04:00
|
|
|
void extal_InitializeClass(JNIEnv *env, jclass clazz, int num_functions, JavaMethodAndExtFunction *functions);
|
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
|
|
|
|
|
2002-12-14 08:52:25 -05:00
|
|
|
typedef struct ALCdevice_struct ALCdevice;
|
|
|
|
typedef struct ALCcontext_struct ALCcontext;
|
|
|
|
|
2002-12-14 07:49:16 -05:00
|
|
|
#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
|
|
|
|
|
2003-10-22 06:57:19 -04:00
|
|
|
void InitializeOpenAL(JNIEnv *env, jobjectArray oalPaths);
|
2002-12-14 07:49:16 -05:00
|
|
|
void DeInitializeOpenAL();
|
|
|
|
|
2005-03-09 08:06:17 -05:00
|
|
|
//extern alGetProcAddressPROC alGetProcAddress;
|
2004-03-10 03:42:40 -05:00
|
|
|
|
|
|
|
typedef ALCcontext* (ALCAPIENTRY *alcGetCurrentContextPROC)(ALCvoid);
|
|
|
|
extern alcGetCurrentContextPROC alcGetCurrentContext;
|
|
|
|
|
2002-12-14 07:49:16 -05:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
2002-12-14 08:37:46 -05:00
|
|
|
#endif
|