lib/minim/src/ddf/minim/javasound/FloatSampleBuffer.java
/**
	 * Write the contents of the byte array to this buffer, overwriting existing
	 * data. If the byte array has fewer channels than this float buffer, only
	 * the first channels are written. Vice versa, if the byte buffer has more
	 * channels than this float buffer, only the first channels of the byte
	 * buffer are written to this buffer.
	 * <p>
	 * The format and the number of samples of this float buffer are not
	 * changed, so if the byte array has more samples than fit into this float
	 * buffer, it is not expanded.
	 * 
	 * @param buffer the byte buffer to write to this float buffer
	 * @param srcByteOffset the offset in bytes in buffer where to start reading
	 * @param format the audio format of the bytes in buffer
	 * @param dstSampleOffset the offset in samples where to start writing the
	 *            converted float data into this float buffer
	 * @param aSampleCount the number of samples to write
	 * @return the number of samples actually written
	 */
Write the contents of the byte array to this buffer, overwriting existing
data. If the byte array has fewer channels than this float buffer, only
the first channels are written. Vice versa, if the byte buffer has more
channels than this float buffer, only the first channels of the byte
buffer are written to this buffer.

The format and the number of samples of this float buffer are not
changed, so if the byte array has more samples than fit into this float
buffer, it is not expanded.


Write the contents of the byte array to this buffer overwriting existing data . If the byte array has fewer channels than this float buffer only the first channels are written . Vice versa if the byte buffer has more channels than this float buffer only the first channels of the byte buffer are written to this buffer . The format and the number of samples of this float buffer are not changed so if the byte array has more samples than fit into this float buffer it is not expanded .
public int writeByteBuffer(byte[] buffer, int srcByteOffset,
			AudioFormat format, int dstSampleOffset, int aSampleCount) {
		if (dstSampleOffset + aSampleCount > getSampleCount()) {
			aSampleCount = getSampleCount() - dstSampleOffset;
		}
		int lChannels = format.getChannels();
		if (lChannels > getChannelCount()) {
			lChannels = getChannelCount();
		}
		if (lChannels > format.getChannels()) {
			lChannels = format.getChannels();
		}
		for (int channel = 0; channel < lChannels; channel++) {
			float[] data = getChannel(channel);
			FloatSampleTools.byte2floatGeneric(buffer, srcByteOffset,
					format.getFrameSize(), data, dstSampleOffset, aSampleCount,
					format);
			srcByteOffset += format.getFrameSize() / format.getChannels();
		}
		return aSampleCount;
	}
public int writeByteBuffer ( byte [ ] buffer , int srcByteOffset , AudioFormat format , int dstSampleOffset , int aSampleCount ) { if ( dstSampleOffset + aSampleCount > getSampleCount ( ) ) { aSampleCount = getSampleCount ( ) - dstSampleOffset ; } int lChannels = format . getChannels ( ) ; if ( lChannels > getChannelCount ( ) ) { lChannels = getChannelCount ( ) ; } if ( lChannels > format . getChannels ( ) ) { lChannels = format . getChannels ( ) ; } for ( int channel = 0 ; channel < lChannels ; channel ++ ) { float [ ] data = getChannel ( channel ) ; FloatSampleTools . byte2floatGeneric ( buffer , srcByteOffset , format . getFrameSize ( ) , data , dstSampleOffset , aSampleCount , format ) ; srcByteOffset += format . getFrameSize ( ) / format . getChannels ( ) ; } return aSampleCount ; }
Write the contents of the byte array to this buffer, overwriting existing
 data.
Write the contents of the byte array to this buffer overwriting existing data .