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.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include "extal.h"
|
||||
|
||||
/**
|
||||
|
@ -111,11 +112,11 @@ alcIsExtensionPresentPROC alcIsExtensionPresent = NULL;
|
|||
alcGetProcAddressPROC alcGetProcAddress = NULL;
|
||||
alcGetEnumValuePROC alcGetEnumValue = NULL;
|
||||
|
||||
#ifdef _WIN32
|
||||
EAXSet eaxSet; // EAXSet function, ret$
|
||||
EAXGet eaxGet; // EAXGet function, ret$
|
||||
|
||||
/* Handle to OpenAL Library */
|
||||
#ifdef WIN32
|
||||
HMODULE handleOAL;
|
||||
#else
|
||||
void* handleOAL;
|
||||
|
@ -383,4 +384,4 @@ int LoadALC() {
|
|||
*/
|
||||
int LoadALExtensions() {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -33,7 +33,9 @@
|
|||
#ifndef _AL_TEST_H
|
||||
#define _AL_TEST_H
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
#include <AL/altypes.h>
|
||||
#include <AL/alctypes.h>
|
||||
|
||||
|
@ -51,9 +53,6 @@ extern "C" {
|
|||
#define ALCAPI __declspec(dllimport)
|
||||
#endif
|
||||
|
||||
typedef struct ALCdevice_struct ALCdevice;
|
||||
typedef struct ALCcontext_struct ALCcontext;
|
||||
|
||||
#define ALCAPIENTRY __cdecl
|
||||
#else
|
||||
#ifdef TARGET_OS_MAC
|
||||
|
@ -62,7 +61,7 @@ extern "C" {
|
|||
#endif
|
||||
#endif
|
||||
#define ALCAPI
|
||||
#define ALCAPIENTRY __cdecl
|
||||
#define ALCAPIENTRY
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
@ -80,10 +79,11 @@ extern "C" {
|
|||
#endif
|
||||
#endif
|
||||
#define ALAPI
|
||||
#define ALAPIENTRY __cdecl
|
||||
#define ALAPIENTRY
|
||||
#define AL_CALLBACK
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
DEFINE_GUID(DSPROPSETID_EAX20_ListenerProperties,
|
||||
0x306a6a8,
|
||||
0xb224,
|
||||
|
@ -95,15 +95,19 @@ DEFINE_GUID(DSPROPSETID_EAX20_BufferProperties,
|
|||
0xb224,
|
||||
0x11d2,
|
||||
0x99, 0xe5, 0x0, 0x0, 0xe8, 0xd8, 0xc7, 0x22);
|
||||
#endif
|
||||
|
||||
#define INITGUID
|
||||
#define OPENAL
|
||||
|
||||
typedef struct ALCdevice_struct ALCdevice;
|
||||
typedef struct ALCcontext_struct ALCcontext;
|
||||
|
||||
int InitializeOpenAL();
|
||||
void DeInitializeOpenAL();
|
||||
|
||||
//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 ALCdevice* (ALCAPIENTRY *alcOpenDevicePROC)(ALCubyte *deviceName);
|
||||
typedef ALCvoid (ALCAPIENTRY *alcCloseDevicePROC)(ALCdevice *device);
|
||||
|
@ -252,14 +256,16 @@ extern alDistanceModelPROC alDistanceModel;
|
|||
extern alDopplerFactorPROC alDopplerFactor;
|
||||
extern alDopplerVelocityPROC alDopplerVelocity;
|
||||
|
||||
#ifdef _WIN32
|
||||
typedef ALenum (*EAXSet)(const GUID*, ALuint, ALuint, ALvoid*, ALuint);
|
||||
typedef ALenum (*EAXGet)(const GUID*, ALuint, ALuint, ALvoid*, ALuint);
|
||||
|
||||
extern EAXSet eaxSet;
|
||||
extern EAXGet eaxGet;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -42,7 +42,9 @@
|
|||
#include "org_lwjgl_openal_ALUT.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#ifdef _WIN32
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
/* OpenAL includes */
|
||||
#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) {
|
||||
alutUnloadWAV(format, (void**) data, size, freq);
|
||||
CHECK_AL_ERROR
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue