开发者

Android : Launch Sounds At

I want to launch multiple sounds every x milis开发者_如何学Goeconds with a good precision (< 5ms).

I tried TimerTask/Handler.postDelayed with MediaPlayer/SoundPool. I always have bad precision.

For instance, I launched sounds like this :

  • launch sound1 in 500ms, 1000ms, 1500ms, 2000ms, 2500ms, ...
  • launch sound2 in 250ms, 500ms, 750ms, 1000ms, 1250ms, 1500ms, 1750ms, ...

Do you have a better idea for this purpose ?

Thank you.


You should try AlarmManager and set it to repeat within the given time you wish

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜