mirror of https://github.com/axmolengine/axmol.git
update "fix a bug that SimpleAudioEngine may cause crash on i9100"
This commit is contained in:
parent
0d5b48eb9e
commit
3921512739
|
@ -95,15 +95,18 @@ unsigned int SimpleAudioEngineOpenSL::playEffect(const char* pszFilePath, bool b
|
|||
if (s_pOpenSL->getEffectState(soundID) == PLAYSTATE_PLAYING)
|
||||
{
|
||||
// recreate an effect player
|
||||
s_pOpenSL->recreatePlayer(pszFilePath);
|
||||
if (s_pOpenSL->recreatePlayer(pszFilePath))
|
||||
{
|
||||
s_pOpenSL->setEffectLooping(soundID, bLoop);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
s_pOpenSL->setEffectState(soundID, PLAYSTATE_STOPPED);
|
||||
s_pOpenSL->setEffectState(soundID, PLAYSTATE_PLAYING);
|
||||
s_pOpenSL->setEffectLooping(soundID, bLoop);
|
||||
}
|
||||
|
||||
s_pOpenSL->setEffectLooping(soundID, bLoop);
|
||||
}
|
||||
|
||||
return soundID;
|
||||
|
|
Loading…
Reference in New Issue