Use OpenAL per default

Deprecate s_libOpenAL and s_useOpenAL for compability and don't
access them anymore.
This commit is contained in:
dhewg 2011-12-14 13:32:40 +01:00
parent 9df3383b61
commit 66141935f5

View file

@ -71,8 +71,8 @@ idCVar idSoundSystemLocal::s_skipHelltimeFX( "s_skipHelltimeFX", "0", CVAR_SOUND
#if ID_OPENAL
// off by default. OpenAL DLL gets loaded on-demand
idCVar idSoundSystemLocal::s_libOpenAL( "s_libOpenAL", "openal32.dll", CVAR_SOUND | CVAR_ARCHIVE, "OpenAL DLL name/path" );
idCVar idSoundSystemLocal::s_useOpenAL( "s_useOpenAL", "0", CVAR_SOUND | CVAR_BOOL | CVAR_ARCHIVE, "use OpenAL" );
idCVar idSoundSystemLocal::s_libOpenAL( "s_libOpenAL", "openal32.dll", CVAR_SOUND | CVAR_ARCHIVE, "Deprecated, kept for compability" );
idCVar idSoundSystemLocal::s_useOpenAL( "s_useOpenAL", "0", CVAR_SOUND | CVAR_BOOL | CVAR_ARCHIVE, "Deprecated, kept for compability" );
idCVar idSoundSystemLocal::s_useEAXReverb( "s_useEAXReverb", "0", CVAR_SOUND | CVAR_BOOL | CVAR_ARCHIVE, "use EAX reverb" );
idCVar idSoundSystemLocal::s_muteEAXReverb( "s_muteEAXReverb", "0", CVAR_SOUND | CVAR_BOOL, "mute eax reverb" );
idCVar idSoundSystemLocal::s_decompressionLimit( "s_decompressionLimit", "6", CVAR_SOUND | CVAR_INTEGER | CVAR_ARCHIVE, "specifies maximum uncompressed sample length in seconds" );
@ -84,7 +84,7 @@ idCVar idSoundSystemLocal::s_muteEAXReverb( "s_muteEAXReverb", "0", CVAR_SOUND |
idCVar idSoundSystemLocal::s_decompressionLimit( "s_decompressionLimit", "6", CVAR_SOUND | CVAR_INTEGER | CVAR_ROM, "specifies maximum uncompressed sample length in seconds" );
#endif
bool idSoundSystemLocal::useOpenAL = false;
bool idSoundSystemLocal::useOpenAL = true;
bool idSoundSystemLocal::useEAXReverb = false;
int idSoundSystemLocal::EAXAvailable = -1;
@ -334,7 +334,6 @@ void idSoundSystemLocal::Init() {
common->StartupVariable( "s_useOpenAL", true );
common->StartupVariable( "s_useEAXReverb", true );
if ( idSoundSystemLocal::s_useOpenAL.GetBool() || idSoundSystemLocal::s_useEAXReverb.GetBool() ) {
common->Printf( "Setup OpenAL device and context... " );
openalDevice = alcOpenDevice( NULL );
openalContext = alcCreateContext( openalDevice, NULL );
@ -344,7 +343,6 @@ void idSoundSystemLocal::Init() {
#if ID_OPENAL_EAX
// try to obtain EAX extensions
if ( idSoundSystemLocal::s_useEAXReverb.GetBool() && alIsExtensionPresent( ID_ALCHAR "EAX4.0" ) ) {
idSoundSystemLocal::s_useOpenAL.SetBool( true ); // EAX presence causes AL enable
alEAXSet = (EAXSet)alGetProcAddress( ID_ALCHAR "EAXSet" );
alEAXGet = (EAXGet)alGetProcAddress( ID_ALCHAR "EAXGet" );
common->Printf( "OpenAL: found EAX 4.0 extension\n" );
@ -404,9 +402,7 @@ void idSoundSystemLocal::Init() {
// adjust source count to allow for at least eight stereo sounds to play
openalSourceCount -= 8;
}
useOpenAL = idSoundSystemLocal::s_useOpenAL.GetBool();
useEAXReverb = idSoundSystemLocal::s_useEAXReverb.GetBool();
cmdSystem->AddCommand( "listSounds", ListSounds_f, CMD_FL_SOUND, "lists all sounds" );