Fixed oal dynamic loading on linux
This commit is contained in:
parent
ddfc7f4919
commit
3a8e2b59f1
|
@ -30,6 +30,7 @@
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
#include "extal.h"
|
#include "extal.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -111,11 +112,11 @@ alcIsExtensionPresentPROC alcIsExtensionPresent = NULL;
|
||||||
alcGetProcAddressPROC alcGetProcAddress = NULL;
|
alcGetProcAddressPROC alcGetProcAddress = NULL;
|
||||||
alcGetEnumValuePROC alcGetEnumValue = NULL;
|
alcGetEnumValuePROC alcGetEnumValue = NULL;
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
EAXSet eaxSet; // EAXSet function, ret$
|
EAXSet eaxSet; // EAXSet function, ret$
|
||||||
EAXGet eaxGet; // EAXGet function, ret$
|
EAXGet eaxGet; // EAXGet function, ret$
|
||||||
|
|
||||||
/* Handle to OpenAL Library */
|
/* Handle to OpenAL Library */
|
||||||
#ifdef WIN32
|
|
||||||
HMODULE handleOAL;
|
HMODULE handleOAL;
|
||||||
#else
|
#else
|
||||||
void* handleOAL;
|
void* handleOAL;
|
||||||
|
@ -383,4 +384,4 @@ int LoadALC() {
|
||||||
*/
|
*/
|
||||||
int LoadALExtensions() {
|
int LoadALExtensions() {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,7 +33,9 @@
|
||||||
#ifndef _AL_TEST_H
|
#ifndef _AL_TEST_H
|
||||||
#define _AL_TEST_H
|
#define _AL_TEST_H
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
#include <AL/altypes.h>
|
#include <AL/altypes.h>
|
||||||
#include <AL/alctypes.h>
|
#include <AL/alctypes.h>
|
||||||
|
|
||||||
|
@ -51,9 +53,6 @@ extern "C" {
|
||||||
#define ALCAPI __declspec(dllimport)
|
#define ALCAPI __declspec(dllimport)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef struct ALCdevice_struct ALCdevice;
|
|
||||||
typedef struct ALCcontext_struct ALCcontext;
|
|
||||||
|
|
||||||
#define ALCAPIENTRY __cdecl
|
#define ALCAPIENTRY __cdecl
|
||||||
#else
|
#else
|
||||||
#ifdef TARGET_OS_MAC
|
#ifdef TARGET_OS_MAC
|
||||||
|
@ -62,7 +61,7 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#define ALCAPI
|
#define ALCAPI
|
||||||
#define ALCAPIENTRY __cdecl
|
#define ALCAPIENTRY
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
@ -80,10 +79,11 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
#define ALAPI
|
#define ALAPI
|
||||||
#define ALAPIENTRY __cdecl
|
#define ALAPIENTRY
|
||||||
#define AL_CALLBACK
|
#define AL_CALLBACK
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
DEFINE_GUID(DSPROPSETID_EAX20_ListenerProperties,
|
DEFINE_GUID(DSPROPSETID_EAX20_ListenerProperties,
|
||||||
0x306a6a8,
|
0x306a6a8,
|
||||||
0xb224,
|
0xb224,
|
||||||
|
@ -95,15 +95,19 @@ DEFINE_GUID(DSPROPSETID_EAX20_BufferProperties,
|
||||||
0xb224,
|
0xb224,
|
||||||
0x11d2,
|
0x11d2,
|
||||||
0x99, 0xe5, 0x0, 0x0, 0xe8, 0xd8, 0xc7, 0x22);
|
0x99, 0xe5, 0x0, 0x0, 0xe8, 0xd8, 0xc7, 0x22);
|
||||||
|
#endif
|
||||||
|
|
||||||
#define INITGUID
|
#define INITGUID
|
||||||
#define OPENAL
|
#define OPENAL
|
||||||
|
|
||||||
|
typedef struct ALCdevice_struct ALCdevice;
|
||||||
|
typedef struct ALCcontext_struct ALCcontext;
|
||||||
|
|
||||||
int InitializeOpenAL();
|
int InitializeOpenAL();
|
||||||
void DeInitializeOpenAL();
|
void DeInitializeOpenAL();
|
||||||
|
|
||||||
//alc
|
//alc
|
||||||
typedef ALCubyte* (ALCAPIENTRY *alcGetStringPROC)(ALCdevice *device,ALCenum param);
|
typedef ALCubyte* (/*ALCAPIENTRY*/ *alcGetStringPROC)(ALCdevice *device,ALCenum param);
|
||||||
typedef ALCvoid (ALCAPIENTRY *alcGetIntegervPROC)(ALCdevice *device,ALCenum param,ALCsizei size,ALCint *data);
|
typedef ALCvoid (ALCAPIENTRY *alcGetIntegervPROC)(ALCdevice *device,ALCenum param,ALCsizei size,ALCint *data);
|
||||||
typedef ALCdevice* (ALCAPIENTRY *alcOpenDevicePROC)(ALCubyte *deviceName);
|
typedef ALCdevice* (ALCAPIENTRY *alcOpenDevicePROC)(ALCubyte *deviceName);
|
||||||
typedef ALCvoid (ALCAPIENTRY *alcCloseDevicePROC)(ALCdevice *device);
|
typedef ALCvoid (ALCAPIENTRY *alcCloseDevicePROC)(ALCdevice *device);
|
||||||
|
@ -252,14 +256,16 @@ extern alDistanceModelPROC alDistanceModel;
|
||||||
extern alDopplerFactorPROC alDopplerFactor;
|
extern alDopplerFactorPROC alDopplerFactor;
|
||||||
extern alDopplerVelocityPROC alDopplerVelocity;
|
extern alDopplerVelocityPROC alDopplerVelocity;
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
typedef ALenum (*EAXSet)(const GUID*, ALuint, ALuint, ALvoid*, ALuint);
|
typedef ALenum (*EAXSet)(const GUID*, ALuint, ALuint, ALvoid*, ALuint);
|
||||||
typedef ALenum (*EAXGet)(const GUID*, ALuint, ALuint, ALvoid*, ALuint);
|
typedef ALenum (*EAXGet)(const GUID*, ALuint, ALuint, ALvoid*, ALuint);
|
||||||
|
|
||||||
extern EAXSet eaxSet;
|
extern EAXSet eaxSet;
|
||||||
extern EAXGet eaxGet;
|
extern EAXGet eaxGet;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -42,7 +42,9 @@
|
||||||
#include "org_lwjgl_openal_ALUT.h"
|
#include "org_lwjgl_openal_ALUT.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#ifdef _WIN32
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
/* OpenAL includes */
|
/* OpenAL includes */
|
||||||
#include "checkALerror.h"
|
#include "checkALerror.h"
|
||||||
|
@ -175,4 +177,4 @@ JNIEXPORT jobject JNICALL Java_org_lwjgl_openal_ALUT_loadWAVMemory (JNIEnv *env,
|
||||||
JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_unloadWAV (JNIEnv *env, jobject obj, jint format, jint data, jint size, jint freq) {
|
JNIEXPORT void JNICALL Java_org_lwjgl_openal_ALUT_unloadWAV (JNIEnv *env, jobject obj, jint format, jint data, jint size, jint freq) {
|
||||||
alutUnloadWAV(format, (void**) data, size, freq);
|
alutUnloadWAV(format, (void**) data, size, freq);
|
||||||
CHECK_AL_ERROR
|
CHECK_AL_ERROR
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue