Fixed a shutdown crash in LLAudioEngine::assetCallback, and fixed behavior when soundsource re-issues a sound whilst a sound is currently playing for same source. (LLAudioChannel[Impl]::play now re-starts sound if already playing)

This commit is contained in:
Shyotl
2013-10-13 16:22:24 -05:00
parent daa07d031c
commit dbfd0cb7a6
5 changed files with 35 additions and 8 deletions

View File

@@ -823,6 +823,13 @@ void LLAudioChannelFMODEX::play()
gSoundCheck.assertActiveState(this,true);
bool paused=true;
Check_FMOD_Error(mChannelp->getPaused(&paused), "FMOD::Channel::getPaused");
if(!paused)
{
Check_FMOD_Error(mChannelp->setPaused(true), "FMOD::Channel::setPaused");
Check_FMOD_Error(mChannelp->setPosition(0,FMOD_TIMEUNIT_PCMBYTES), "FMOD::Channel::setPosition");
}
Check_FMOD_Error(mChannelp->setPaused(false), "FMOD::Channel::setPaused");
if(sVerboseDebugging)