Code example for SoundPool

Methods: setVolume

0
		if (value < 0) 
			value = 0;
		if (mVolume == value) 
			return; 
		mVolume = value;
		SOUND_POOL.setVolume(mStreamId, leftPan(mVolume, mPan), rightPan(mVolume, mPan));
	} 
	 
	/** 
	 * Get the panning factor (a value from -1 to 1) of the sound during playback. 
	 */ 
	public float getPan() { return mPan; }
	 
	/** 
	 * Alter the panning factor (a value from -1 to 1) of the sound during playback. 
	 */ 
	public void setPan(float value) {
		if (value < -1) 
			value = -1;
		if (value > 1)