Code example for MediaPlayer

Methods: isPlayingstop, equals

0
 
	/** 
	 * Stop any sound before start a new one 
	 * */ 
	public void stopSounds() { 
		if (!this.mp.equals(null) && this.mp.isPlaying()) {
			this.mp.stop();
			firstLoad = true;
		} 
	} 
 
	/** 
	 * Start the sound previously loaded 
	 * */ 
	public void startSound() { 
		this.mp.start();
	} 
 
	/** 
	 * Initialize the passed sound 
	 * */