Воспроизведение нескольких звуков одновременно в Android

Я не могу использовать следующее для кодирования для одновременного воспроизведения нескольких звуков / звуковых сигналов. В моемonclicklistener Я добавил:

public void onClick(View v) { 
     mSoundManager.playSound(1); 
     mSoundManager.playSound(2); 
} 

Но одновременно воспроизводится только один звук: звук с индексом 1, за которым следует звук с индексом 2.

Как я могу воспроизвести как минимум 2 звука одновременно, используя этот код, когда есть событие onClick ()?

public class SoundManager {

private  SoundPool mSoundPool; 
private  HashMap<Integer, Integer> mSoundPoolMap; 
private  AudioManager  mAudioManager;
private  Context mContext;


public SoundManager()
{

}

public void initSounds(Context theContext) { 
     mContext = theContext;
     mSoundPool = new SoundPool(4, AudioManager.STREAM_MUSIC, 0); 
     mSoundPoolMap = new HashMap<Integer, Integer>(); 
     mAudioManager = (AudioManager)mContext.getSystemService(Context.AUDIO_SERVICE);         
} 

public void addSound(int Index,int SoundID)
{
    mSoundPoolMap.put(1, mSoundPool.load(mContext, SoundID, 1));
}

public void playSound(int index) { 

     int streamVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC); 
     mSoundPool.play(mSoundPoolMap.get(index), streamVolume, streamVolume, 1, 0, 1f); 
}

public void playLoopedSound(int index) { 

     int streamVolume = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC); 
     mSoundPool.play(mSoundPoolMap.get(index), streamVolume, streamVolume, 1, -1, 1f); 
}

}

Ответы на вопрос(1)

Ваш ответ на вопрос