I try to play 2 audio files at the same time (in this case mp3) so that they start EXACTLY at the same time and play synchronously with each other.
My first attempt was to simply use two MediaPlayers, prepare them ahead of schedule, and then call the beginning of each of them back:
mediaPlayer.start();
secondPlayer.start();
Unfortunately, this only works for a while. Sometimes they start together and then synchronize. Sometimes a very short period of time begins between them, so that they will not synchronize together.
Is there a better way to play audio files so that they run at the same time? I also need to be able to control my volumes independently of each other.
Thank!
source
share