IOQ3 commit 1930

This commit is contained in:
Richard Allen 2011-05-18 00:13:52 +00:00
parent 91d1e4347b
commit 0ada47a900
2 changed files with 10 additions and 2 deletions

View file

@ -44,12 +44,17 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#else
#include <AL/al.h>
#include <AL/alc.h>
#include <AL/alext.h>
#endif
#endif
#include "qal_efx.h"
/* Hack to enable compiling both on OpenAL SDK and OpenAL-soft. */
#ifndef ALC_ENUMERATE_ALL_EXT
# define ALC_ENUMERATE_ALL_EXT 1
# define ALC_DEFAULT_ALL_DEVICES_SPECIFIER 0x1012
# define ALC_ALL_DEVICES_SPECIFIER 0x1013
#endif
#ifdef USE_OPENAL_DLOPEN
extern LPALENABLE qalEnable;

View file

@ -3134,15 +3134,18 @@ qboolean S_AL_Init( soundInterface_t *si )
// get all available devices + the default device name.
if(enumeration_ext)
{
devicelist = qalcGetString(NULL, ALC_ALL_DEVICES_SPECIFIER);
defaultdevice = qalcGetString(NULL, ALC_DEFAULT_ALL_DEVICES_SPECIFIER);
}
else
{
// We don't have ALC_ENUMERATE_ALL_EXT but normal enumeration.
devicelist = qalcGetString(NULL, ALC_DEVICE_SPECIFIER);
defaultdevice = qalcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
enumeration_ext = qtrue;
}
defaultdevice = qalcGetString(NULL, ALC_DEFAULT_DEVICE_SPECIFIER);
#ifdef _WIN32
// check whether the default device is generic hardware. If it is, change to