Code example for SoundPool

Methods: setVolume

0
	/** 
	 * Set the volume of a sound 
	 */ 
	public void volume(String sound, float volume) {
		 
		mSoundPool.setVolume(mSounds.get(sound), volume, volume);
	} 
	 
	 
	/** 
	 * Play a sound, once or loop. 
	 */ 
	public void play(String sound, boolean loop) {
		 
		float volume;
		volume  = mAudioManager.getStreamVolume(AudioManager.STREAM_MUSIC);
		volume /= mAudioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC);
		 
	    mSoundPool.play(
	    		mSounds.get(sound), 
	    		volume,