Replace deprecated alDopplerVelocity with alSpeedOfSound per OpenAL 1.1 spec

This commit is contained in:
MAN-AT-ARMS 2014-02-22 17:57:19 -05:00 committed by Zack Middleton
parent 3740c55dec
commit 6887a69064
2 changed files with 5 additions and 2 deletions

View file

@ -84,6 +84,7 @@ LPALGETBUFFERF qalGetBufferf;
LPALGETBUFFERI qalGetBufferi; LPALGETBUFFERI qalGetBufferi;
LPALDOPPLERFACTOR qalDopplerFactor; LPALDOPPLERFACTOR qalDopplerFactor;
LPALDOPPLERVELOCITY qalDopplerVelocity; LPALDOPPLERVELOCITY qalDopplerVelocity;
LPALSPEEDOFSOUND qalSpeedOfSound;
LPALDISTANCEMODEL qalDistanceModel; LPALDISTANCEMODEL qalDistanceModel;
LPALCCREATECONTEXT qalcCreateContext; LPALCCREATECONTEXT qalcCreateContext;
@ -202,6 +203,7 @@ qboolean QAL_Init(const char *libname)
qalGetBufferi = GPA("alGetBufferi"); qalGetBufferi = GPA("alGetBufferi");
qalDopplerFactor = GPA("alDopplerFactor"); qalDopplerFactor = GPA("alDopplerFactor");
qalDopplerVelocity = GPA("alDopplerVelocity"); qalDopplerVelocity = GPA("alDopplerVelocity");
qalSpeedOfSound = GPA("alSpeedOfSound");
qalDistanceModel = GPA("alDistanceModel"); qalDistanceModel = GPA("alDistanceModel");
qalcCreateContext = GPA("alcCreateContext"); qalcCreateContext = GPA("alcCreateContext");
@ -301,6 +303,7 @@ void QAL_Shutdown( void )
qalGetBufferi = NULL; qalGetBufferi = NULL;
qalDopplerFactor = NULL; qalDopplerFactor = NULL;
qalDopplerVelocity = NULL; qalDopplerVelocity = NULL;
qalSpeedOfSound = NULL;
qalDistanceModel = NULL; qalDistanceModel = NULL;
qalcCreateContext = NULL; qalcCreateContext = NULL;

View file

@ -2309,7 +2309,7 @@ void S_AL_Update( void )
} }
if(s_alDopplerSpeed->modified) if(s_alDopplerSpeed->modified)
{ {
qalDopplerVelocity(s_alDopplerSpeed->value); qalSpeedOfSound(s_alDopplerSpeed->value);
s_alDopplerSpeed->modified = qfalse; s_alDopplerSpeed->modified = qfalse;
} }
@ -2623,7 +2623,7 @@ qboolean S_AL_Init( soundInterface_t *si )
// Set up OpenAL parameters (doppler, etc) // Set up OpenAL parameters (doppler, etc)
qalDistanceModel(AL_INVERSE_DISTANCE_CLAMPED); qalDistanceModel(AL_INVERSE_DISTANCE_CLAMPED);
qalDopplerFactor( s_alDopplerFactor->value ); qalDopplerFactor( s_alDopplerFactor->value );
qalDopplerVelocity( s_alDopplerSpeed->value ); qalSpeedOfSound( s_alDopplerSpeed->value );
#ifdef USE_VOIP #ifdef USE_VOIP
// !!! FIXME: some of these alcCaptureOpenDevice() values should be cvars. // !!! FIXME: some of these alcCaptureOpenDevice() values should be cvars.