Sound effects won't overlap.

Started by
1 comment, last by LAURENT* 7 years ago

Hello,

I'm having a serious problem with audio in my game. My sound effects won't overlap. My game uses bullets that fire at a somewhat frequent state and I need to play the sounds repeatedly. I tried to use a class call media player but I don't think this will be helpful and to top it off the Music continued to play even after I exited to my phone's home screen.

Could someone recommend me a better method for handling sound for my game? I'm so close to done with the programming part then I'll finally be able to start making levels. Please help me.

Advertisement

I tried to use a class call media player but I don't think this will be helpful and to top it off the Music continued to play even after I exited to my phone's home screen.

Have you looked at the SoundPool class for that?

I've read that multiple simultaneous MediaPlayer objects don't always work well together, so that may be the source of the issue. I've never tried that route, so I'm not sure if that's the situation.

Thanks a lot.

At first using the sound pool class lagged my game hard, but then I got the idea to only use it for small sound effects instead. Thanks

This topic is closed to new replies.

Advertisement