Fix part of #34083: crash trying to play surround .wav file in the game engine

on Windows, it still doesn't play but it doesn't crash at least.
This commit is contained in:
Brecht Van Lommel 2013-02-07 21:29:31 +00:00
parent 7cb62127b3
commit faaee15407

@ -132,10 +132,13 @@ void KX_SoundActuator::play()
handle3d->setConeVolumeOuter(m_3d.cone_outer_gain); handle3d->setConeVolumeOuter(m_3d.cone_outer_gain);
} }
if (loop) if (m_handle.get()) {
m_handle->setLoopCount(-1); if (loop)
m_handle->setPitch(m_pitch); m_handle->setLoopCount(-1);
m_handle->setVolume(m_volume); m_handle->setPitch(m_pitch);
m_handle->setVolume(m_volume);
}
m_isplaying = true; m_isplaying = true;
} }