Merge pull request #2106 from waiter/master

Update unload effect function (android normal)
This commit is contained in:
minggo 2013-03-05 22:45:10 -08:00
commit 7969224bf3
1 changed files with 4 additions and 2 deletions

View File

@ -129,8 +129,10 @@ public class Cocos2dxSound {
// unload effect
final Integer soundID = this.mPathSoundIDMap.get(pPath);
this.mSoundPool.unload(soundID);
this.mPathSoundIDMap.remove(pPath);
if(soundID != null){
this.mSoundPool.unload(soundID);
this.mPathSoundIDMap.remove(pPath);
}
}
public int playEffect(final String pPath, final boolean pLoop) {