如下
bool isEffectPlaying(unsigned int nSoundId);
定义如下
bool SimpleAudioEngine::isEffectPlaying(unsigned int nSoundId) { EffectList::iterator p = sharedList().find(nSoundId); bool bRet = false; if (p != sharedList().end()) { bRet = p->second->IsPlaying(); } return bRet; }完成 原文链接:https://www.f2er.com/cocos2dx/346060.html