Code example for SoundPool

0
    	if (instance == null) {
    		mSoundId = new HashMap<Integer, Integer>();
    		mSoundProgress = new HashMap<Integer, Long>();
    		mSoundDuration = new HashMap<Integer, Long>();
    		mTimeStamp = System.currentTimeMillis();
			mSoundPool = new SoundPool(8, AudioManager.STREAM_MUSIC, 0);
		} 
 
    	instance = this;
    	mContext = context;
    } 
	 
	public void doPause() 
	{ 
		if (mSoundPool != null) {
			mSoundPool.autoPause();
		} 
		 
		if (mediaPlayer != null) {
			mediaPlayerWasPlaying = mediaPlayer.isPlaying ();
Contextual code suggestions in your IDE  Get Codota for Java