after so much searching , i couldnt find any solution to stopping effect in cocos2d.
my effect is playing a sound that been taken from database, so to stop that particular sound i have to to this :
[[SimpleAudioEngine sharedEngine] stopEffect:[NSString stringWithFormat:@"%@.wav",sound]];
BUT i got warning : stopEffect making integer from pointer without cast ..
why is that ? how can i stop all the sounds that being playing at once ??? or not a particular one ? any other way ?
thanks a lot .
ok you do this :
ALuint soundEffectID;
//to start
soundEffectID=[[SimpleAudioEngine sharedEngine] playEffect:@"my sound"];
//to stop
[[SimpleAudioEngine sharedEngine] stopEffect:soundEffectID];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With