lib/minim/src/ddf/minim/javasound/FloatSampleTools.java
/**
	 * @param output an array of float[] arrays
	 * @param allowAddChannel if true, and output has fewer channels than
	 *            format, then only output.length channels are filled
	 * @throws ArrayIndexOutOfBoundsException if output does not
	 *             format.getChannels() elements
	 * @see #byte2float(byte[] input, int inByteOffset, Object[] output, int
	 *      outOffset, int frameCount, AudioFormat format, boolean
	 *      allowAddChannel)
	 */
@param output an array of float[] arrays
@param allowAddChannel if true, and output has fewer channels than
format, then only output.length channels are filled
@throws ArrayIndexOutOfBoundsException if output does not
format.getChannels() elements
@see #byte2float(byte[] input, int inByteOffset, Object[] output, int
outOffset, int frameCount, AudioFormat format, boolean
allowAddChannel)
@param output an array of float [] arrays @param allowAddChannel if true and output has fewer channels than format then only output . length channels are filled @throws ArrayIndexOutOfBoundsException if output does not format . getChannels () elements @see #byte2float ( byte [] input int inByteOffset Object [] output int outOffset int frameCount AudioFormat format boolean allowAddChannel )
public static void byte2float(byte[] input, int inByteOffset,
			Object[] output, int outOffset, int frameCount, AudioFormat format,
			boolean allowAddChannel) {
		int channels = format.getChannels();
		if (!allowAddChannel && channels > output.length) {
			channels = output.length;
		}
		if (output.length < channels) {
			throw new ArrayIndexOutOfBoundsException(
					"too few channel output array");
		}
		for (int channel = 0; channel < channels; channel++) {
			float[] data = (float[]) output[channel];
			if (data.length < frameCount + outOffset) {
				data = new float[frameCount + outOffset];
				output[channel] = data;
			}
			byte2floatGeneric(input, inByteOffset, format.getFrameSize(), data,
					outOffset, frameCount, format);
			inByteOffset += format.getFrameSize() / format.getChannels();
		}
	}
public static void byte2float ( byte [ ] input , int inByteOffset , Object [ ] output , int outOffset , int frameCount , AudioFormat format , boolean allowAddChannel ) { int channels = format . getChannels ( ) ; if ( ! allowAddChannel && channels > output . length ) { channels = output . length ; } if ( output . length < channels ) { throw new ArrayIndexOutOfBoundsException ( "too few channel output array" ) ; } for ( int channel = 0 ; channel < channels ; channel ++ ) { float [ ] data = ( float [ ] ) output [ channel ] ; if ( data . length < frameCount + outOffset ) { data = new float [ frameCount + outOffset ] ; output [ channel ] = data ; } byte2floatGeneric ( input , inByteOffset , format . getFrameSize ( ) , data , outOffset , frameCount , format ) ; inByteOffset += format . getFrameSize ( ) / format . getChannels ( ) ; } }
@param output an array of float[] arrays
 @param allowAddChannel if true, and output has fewer channels than
            format, then only output.length channels are filled
 @throws ArrayIndexOutOfBoundsException if output does not
             format.getChannels() elements
 @see #byte2float(byte[] input, int inByteOffset, Object[] output, int
      outOffset, int frameCount, AudioFormat format, boolean
      allowAddChannel)
@param output an array of float [] arrays @param allowAddChannel if true and output has fewer channels than format then only output . length channels are filled @throws ArrayIndexOutOfBoundsException if output does not format . getChannels () elements @see #byte2float ( byte [] input int inByteOffset Object [] output int outOffset int frameCount AudioFormat format boolean allowAddChannel )