I have Objects fling over the screen, when user taps an object - it explodes, using self-made animation(not CCAnimation or smt, self-made code for changing textures from array over time). It works fine.
I tried to add a simple sound on exlode:
#import "SimpleAudioEngine.h"
#import "CDAudionManager.h"
#import "CocosDenshion.h"
...
if (blowflag)
blowCount = blowCount +dt;
if (frame<NOfFrames)
{
frame = (blowCount/timePerFrame)
}
if (blowSoundNotPlayed)
{
[[SimpleAudioEngine sharedEngine] playEffect:@"explode.wav"]; //without this line everything works fine, no sound ofc.
blowSoundNotPlayed=0;
}
...
return frame;
As a result, i get no explode-animation(it works without that line), and my mic breaks, stops detecting blowsound. But sound works :D
Questions: Why it happens? Maybe i better use cacao instruments to play 1 freaking sound?
Thanks for any help