开发者

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

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 applica开发者_运维问答tions for Android and they work fine in this department, so what am I missing here? Thanks already for reading through.


"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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜