I want to play 2 sounds at same time and i want to play them at same time
Here is my code :
if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M){
AudioAttributes audioAttributes = new AudioAttributes.Builder().setContentType(AudioAttributes.CONTENT_TYPE_MUSIC).setUsage(AudioAttributes.USAGE_GAME).build();
soundPool=new SoundPool.Builder().setAudioAttributes(audioAttributes).build();
}else{
soundPool =new SoundPool(2, AudioManager.STREAM_MUSIC, 0);
}
shoot = soundPool.load(gameActivity,R.raw.shoot,1);
getShot = soundPool.load(gameActivity, R.raw.get_shot,1);
soundPool.play(getShot,1,1,0,0,1);
soundPool.play(shoot,1,1,0,0,1);
Those play are located not in same method but it's irrelevant.