hello there, i want ask how can get the effect sound is playing?? thanks a lot.
CocosDenshion doesnโt have the interface, because the effect is always short, and it is not necessary to know whether the effect is playing.
there is short but i used effect to play sound of comment.
its like when the comment out, then the next game launched, in simpleAudioEngine, i found this
bool SimpleAudioEngine::isBackgroundMusicPlaying()
{
return sharedMusic().IsPlaying();
}
bool MciPlayer::IsPlaying()
{
return m_bPlaying;
}
but there is used to background music, can you help me to get effect sound isplaying sir? thanks a lot and sorry for my bad english.
if you do want this function, you could hack the source code to add a method as follow:
bool SimpleAudioEngine::isEffectPlaying(unsigned int nSoundId)
{
EffectList::iterator p = sharedList().find(nSoundId);
if (p != sharedList().end())
{
return p->second->IsPlaying();
}
return false;
}
@ronghong, thanks a lot for the function. its so help me.