Code example for SoundPool

Methods: releaseunload

0
		} 
	} 
	public void onStop() { 
		super.onStop(); 
		if(mSoundPool != null) {
			mSoundPool.unload(buttonClick_sound);
			mSoundPool.release();
		} 
	} 
	class SubMenuClickListener implements OnClickListener {
		public void onClick(View v) {
			mSoundPool.play(buttonClick_sound, 0.5f, 0.5f, 1, 0, 1.0f);
			if(v == home_ib) {
				Intent home_it = new Intent(SubMenuActivity.this, MainMenuActivity.class);
				startActivity(home_it);
				SubMenuActivity.this.finish();
			} 
			else if(v == quit_ib) {
		    	setResult(RESULT_OK, it);
		    	SubMenuActivity.this.finish();
			}