user3293494
user3293494

Reputation: 609

Playing short sounds in separate thread

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

Answers (1)

Nana Ghartey
Nana Ghartey

Reputation: 7927

Yes! You should play the sound on a a separate thread. Check the solution provided to a similar question here

Upvotes: 1

Related Questions