hi here the code which i use try this is the way where you can use sound engine in four override methods hope it will help full for u
@Override
protected void onStart() {
// Preload background music
SoundEngine.sharedEngine().preloadSound(context, R.raw.theme_ver1);
SoundEngine.sharedEngine().playSound(context, R.raw.theme_ver1, true);
SoundEngine.sharedEngine().preloadEffect(CCDirector.sharedDirector().getActivity(), R.raw.object_tap2);
super.onStart();
}
@Override
protected void onPause() {
SoundEngine.sharedEngine().pauseSound();
super.onPause();
}
@Override
protected void onResume() {
SoundEngine.sharedEngine().resumeSound();
super.onResume();
}
@Override
protected void onDestroy() {
SoundEngine.sharedEngine().realesAllEffects();
SoundEngine.sharedEngine().realesAllSounds();
SoundEngine.purgeSharedEngine();
super.onDestroy();
}