Code example for SoundPool

Methods: autoResume

0
 
	public void resume() { 
		if(isInactive)
			return; 
		 
		soundPool.autoResume();
		startMusic(musicType,songtime);
	} 
	 
	public void pauseMusic() { 
		isMusicReady = false;
		if(musicPlayer != null) {
			try{ 
				musicPlayer.pause();
				isMusicReady = true;
			} catch(IllegalStateException e) {
				isMusicReady = false;
			} 
		} 
	}