Reputation: 609
In my android game, there are 36 falling balls. When a ball touches the ground a sound is played. The sound is very small, only 0.3 sec. I am using soundpool
class to play it. It may happen in the game that all 36 balls fall in quick succession. Playing the sound so many times may block the UI thread. Is it advisable to play sound on separate thread ?
Upvotes: 0
Views: 4161
Reputation: 7927
Yes! You should play the sound on a a separate thread. Check the solution provided to a similar question here
Upvotes: 1