I am trying to play two sounds simutaneosly in android.I have created two MediaPlayers and am using the code below.They are currently playing one after another.Or not exactly one after another but kinda delayed into eachother.
private void playSound(){
if (mp1 != null) {
mp1.release();
}
if (mp2 != null) {
mp2.release();
}
mp1 = MediaPlayer.create(this, soundArray[0]);
mp2 = MediaPlayer.create(this, soundArray[3]);
mp1.start();
mp2.start();
}
Thanks
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…