More oal linux fixes

This commit is contained in:
Elias Naur 2002-12-14 13:44:55 +00:00
parent 3a8e2b59f1
commit 102757c802
2 changed files with 7 additions and 3 deletions

View File

@ -33,6 +33,10 @@
#include <stdio.h>
#include "extal.h"
#ifndef _WIN32
#include <dlfcn.h>
#endif
/**
* $Id$
*
@ -150,7 +154,7 @@ void* GetFunctionPointer(const char* function) {
#ifdef _WIN32
return GetProcAddress(handleOAL, function);
#else
return NULL;
return dlsym(handleOAL, function);
#endif
}
@ -161,7 +165,7 @@ void LoadOpenAL() {
#ifdef _WIN32
handleOAL = LoadLibrary("OpenAL32.dll");
#else
handleOAL = NULL;
handleOAL = dlopen("libopenal.so", RTLD_LAZY);
#endif
}

View File

@ -107,7 +107,7 @@ 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);