1

I need to play sound effects in my game such as jump, failed, shot etc. So for this purpose I have selected SoundPool class. But there were some times when it lagged. So I wonder what is correct way to use this class. I have tried to use play method in new thread, it seems work better but I don't know if I am correct. Please advice how to use object of this class correctly for better performance.

helloandroid
  • 55
  • 1
  • 5

1 Answers1

0

Best way to implement Sound / Music into your game is by using Service component. Read this answer here for an example.

Community
  • 1
  • 1
SuppressWarnings
  • 4,134
  • 4
  • 25
  • 33