lib/minim/src/ddf/minim/javasound/FloatSampleTools.java
/**
	 * Conversion function to convert one audio channel in an interleaved byte
	 * array to a float array. The float array will contain normalized samples
	 * in the range [-1.0, +1.0]. The input array provides bytes in the format
	 * specified in <code>format</code>.
	 * <p>
	 * Only PCM formats are accepted. The method will convert all byte values
	 * from <code>input[inByteOffset]</code> to
	 * <code>input[inByteOffset + (frameCount * format.getFrameSize()) - 1]</code>
	 * to floats from <code>output(n)[outOffset]</code> to
	 * <code>output(n)[outOffset + frameCount - 1]</code>
	 * 
	 * @param channel the channel number to extract from the input audio data
	 * @param input the audio data in an byte array
	 * @param inByteOffset index in input where to start the conversion
	 * @param output the of float array which receives the converted audio data.
	 * @param outOffset the start offset in <code>output</code>
	 * @param frameCount number of frames to be converted
	 * @param format the input format. Only packed PCM is allowed
	 * @throws IllegalArgumentException if one of the parameters is out of
	 *             bounds
	 */
Conversion function to convert one audio channel in an interleaved byte
array to a float array. The float array will contain normalized samples
in the range [-1.0, +1.0]. The input array provides bytes in the format
specified in format.

Only PCM formats are accepted. The method will convert all byte values
from input[inByteOffset] to
input[inByteOffset + (frameCount * format.getFrameSize()) - 1]
to floats from output(n)[outOffset] to
output(n)[outOffset + frameCount - 1]

@param channel the channel number to extract from the input audio data
@param input the audio data in an byte array
@param inByteOffset index in input where to start the conversion
@param output the of float array which receives the converted audio data.
@param outOffset the start offset in output
@param frameCount number of frames to be converted
@param format the input format. Only packed PCM is allowed
@throws IllegalArgumentException if one of the parameters is out of
bounds
Conversion function to convert one audio channel in an interleaved byte array to a float array . The float array will contain normalized samples in the range [ - 1 . 0 + 1 . 0 ] . The input array provides bytes in the format specified in format . Only PCM formats are accepted . The method will convert all byte values from input [ inByteOffset ] to input [ inByteOffset + ( frameCount * format . getFrameSize () ) - 1 ] to floats from output ( n ) [ outOffset ] to output ( n ) [ outOffset + frameCount - 1 ] @param channel the channel number to extract from the input audio data @param input the audio data in an byte array @param inByteOffset index in input where to start the conversion @param output the of float array which receives the converted audio data . @param outOffset the start offset in output @param frameCount number of frames to be converted @param format the input format . Only packed PCM is allowed @throws IllegalArgumentException if one of the parameters is out of bounds
public static void byte2float(int channel, byte[] input, int inByteOffset,
			float[] output, int outOffset, int frameCount, AudioFormat format) {
		if (channel >= format.getChannels()) {
			throw new IllegalArgumentException("channel out of bounds");
		}
		if (output.length < frameCount + outOffset) {
			throw new IllegalArgumentException("data is too small");
		}
		inByteOffset += format.getFrameSize() / format.getChannels() * channel;
		byte2floatGeneric(input, inByteOffset, format.getFrameSize(), output,
				outOffset, frameCount, format);
	}
public static void byte2float ( int channel , byte [ ] input , int inByteOffset , float [ ] output , int outOffset , int frameCount , AudioFormat format ) { if ( channel >= format . getChannels ( ) ) { throw new IllegalArgumentException ( "channel out of bounds" ) ; } if ( output . length < frameCount + outOffset ) { throw new IllegalArgumentException ( "data is too small" ) ; } inByteOffset += format . getFrameSize ( ) / format . getChannels ( ) * channel ; byte2floatGeneric ( input , inByteOffset , format . getFrameSize ( ) , output , outOffset , frameCount , format ) ; }
Conversion function to convert one audio channel in an interleaved byte
 array to a float array.
Conversion function to convert one audio channel in an interleaved byte array to a float array .
// "select" the channel