How does one play sounds asynchronously and simultaneously(polyphony) on Android?

596 Views Asked by At

Imagine a piano like touch based application. Now all that has to be done is to assign different sound files to different keys. I am using the SoundPool class but the following problems are happening:

  • The sounds don't play simultaneously. Rarely do I hear two sounds playing together
  • A few touches don't get detected when a sound is playing
  • The responsiveness is way too bad, for example a sound will play about 200-300 ms after the corresponding key has been touched

I have seen other piano applications for Android and they work fine in this department, so what am I missing here? Thanks already for reading through.

1

There are 1 best solutions below

0
On

"The responsiveness is way too bad, for example a sound will play about 200-300 ms after the corresponding key has been touched"

Consider checking your source audio files? I had a similar issue and needed to edit the audio files to strip out silence at the beginning of the file.