Code example for SoundPool

Methods: autoPause

0
    } 
	 
	public void doPause() 
	{ 
		if (mSoundPool != null) {
			mSoundPool.autoPause();
		} 
		 
		if (mediaPlayer != null) {
			mediaPlayerWasPlaying = mediaPlayer.isPlaying ();
			mediaPlayer.pause();
		} 
	} 
 
	public void doResume() 
	{ 
		mTimeStamp = System.currentTimeMillis();
		mSoundPool.autoResume();
 
		if (mediaPlayer != null && mediaPlayerWasPlaying) {
			mediaPlayer.start ();