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

View file

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