Having 2 Mediaplayer objects playing in sync - And

2019-08-24 04:14发布

问题:

In my android game I want to have a rhythm Mediaplayer object and a lead Mediaplayer object playing in sync. However at the moment the rhythm is a slight bit behind the playback of the lead Mediaplayer object. Is there a way I can make it so that both are started at the same time, for instance using Runnables etc?!

It's quite crucial that they play in sync with each other as you can imagine! Many thanks

回答1:

Try using SoundPool which seems to be created just for this kind of task. An example.

Also for the sounds that are synced to user actions use Jet sounds.