Don't pass NaNs to OpenAL

git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@13585 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
curaga 2013-08-28 13:50:20 +00:00
parent c96bd8d64e
commit c353dc1013

View File

@ -121,7 +121,7 @@ bool SFXOpenAL::init()
*/
void SFXOpenAL::speed(float factor)
{
if(!m_ok) return;
if(!m_ok || !isnormal(factor)) return;
//OpenAL only accepts pitches in the range of 0.5 to 2.0
if(factor > 2.0f)