I'm using SimpleAudioEngine and I'm trying to detect if a sound effect is finish playing before continuing.
I'm looking for any method, but the one I'm trying to implement doesn't work!
CDSoundEngine *engine = [CDAudioManager sharedManager].soundEngine;
ALuint soundId = [[SimpleAudioEngine sharedEngine] playEffect:soundId];
float seconds = [engine bufferDurationInSeconds:soundId];
Every time I use bufferDurationInSeconds, it returns a float value of -1 to variable seconds. I checked the implementation, and it returns a -1 when the id is not valid, but I'm 100% the ID is valid!
Can anyone help me on this problem, or suggest me another way to detect the end of an sound effect?