lib/minim/src/ddf/minim/javasound/FloatSampleBuffer.java
/**
	 * Fade the volume level of the specified channel from the given start volume to 
	 * the end volume.
	 * The fade will start at the offset, and will have reached endVol after count 
	 * samples.
	 * E.g. to implement a fade in, use startVol=0 and endVol=1.
	 *
	 * @param channel the channel to do the fade 
	 * @param startVol the start volume as a linear factor [0..1]
	 * @param endVol the end volume as a linear factor [0..1]
	 * @param offset the offset in this buffer where to start the fade (in samples)
	 * @param count the number of samples to fade
	 */
Fade the volume level of the specified channel from the given start volume to
the end volume.
The fade will start at the offset, and will have reached endVol after count
samples.


Fade the volume level of the specified channel from the given start volume to the end volume . The fade will start at the offset and will have reached endVol after count samples .
public void linearFade(int channel, float startVol, float endVol, int offset, int count) {
		if (count <= 0) return;
		float end = count+offset;
		float inc = (endVol - startVol) / count;
		float[] samples = getChannel(channel);
		float curr = startVol;
		for (int i = offset; i < end; i++) {
			samples[i] *= curr;
			curr += inc;
		}
	}
public void linearFade ( int channel , float startVol , float endVol , int offset , int count ) { if ( count <= 0 ) return ; float end = count + offset ; float inc = ( endVol - startVol ) / count ; float [ ] samples = getChannel ( channel ) ; float curr = startVol ; for ( int i = offset ; i < end ; i ++ ) { samples [ i ] *= curr ; curr += inc ; } }
Fade the volume level of the specified channel from the given start volume to
 the end volume.
Fade the volume level of the specified channel from the given start volume to the end volume .