mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
Remove need to link against libopenal
libopenal is loaded with dlopen() and for all used alBla and alcBla functions there are function pointers (just like thee qgl stuff for OpenGL). Thus there's no need to link against libopenal on compile-time. There were a few occurences of "normal" openal functions (al* instead of qal*) - they are fixed now. This allows to use a yquake2 version compield with WITH_OPENAL=yes to be used on systems that have no libopenal installed (the standard SDL sound backend will be used then).
This commit is contained in:
parent
4520d53b26
commit
ebccfc63df
2 changed files with 12 additions and 12 deletions
1
Makefile
1
Makefile
|
@ -188,7 +188,6 @@ endif
|
|||
|
||||
ifeq ($(WITH_OPENAL),yes)
|
||||
release/quake2 : CFLAGS += -DUSE_OPENAL -DDEFAULT_OPENAL_DRIVER='"libopenal.so.1"'
|
||||
release/quake2 : LDFLAGS += -lopenal
|
||||
endif
|
||||
|
||||
ifeq ($(WITH_ZIP),yes)
|
||||
|
|
|
@ -159,9 +159,9 @@ void QAL_SoundInfo()
|
|||
Com_Printf("AL_VERSION: %s\n", qalGetString(AL_VERSION));
|
||||
Com_Printf("AL_EXTENSIONS: %s\n", qalGetString(AL_EXTENSIONS));
|
||||
|
||||
if (alcIsExtensionPresent(NULL, "ALC_ENUMERATE_ALL_EXT"))
|
||||
if (qalcIsExtensionPresent(NULL, "ALC_ENUMERATE_ALL_EXT"))
|
||||
{
|
||||
const char *devs = alcGetString(NULL, ALC_ALL_DEVICES_SPECIFIER);
|
||||
const char *devs = qalcGetString(NULL, ALC_ALL_DEVICES_SPECIFIER);
|
||||
|
||||
Com_Printf("\nAvailable OpenAL devices:\n");
|
||||
|
||||
|
@ -181,9 +181,9 @@ void QAL_SoundInfo()
|
|||
}
|
||||
}
|
||||
|
||||
if (alcIsExtensionPresent(NULL, "ALC_ENUMERATE_ALL_EXT"))
|
||||
if (qalcIsExtensionPresent(NULL, "ALC_ENUMERATE_ALL_EXT"))
|
||||
{
|
||||
const char *devs = alcGetString(device, ALC_DEVICE_SPECIFIER);
|
||||
const char *devs = qalcGetString(device, ALC_DEVICE_SPECIFIER);
|
||||
|
||||
Com_Printf("\nCurrent OpenAL device:\n");
|
||||
|
||||
|
@ -344,6 +344,7 @@ QAL_Init()
|
|||
|
||||
if (!handle)
|
||||
{
|
||||
Com_Printf("Loading %s failed! Disabling OpenAL.\n", al_driver->string);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue