lib/minim/src/ddf/minim/javasound/FloatSampleBuffer.java
/**
	 * Inserts a channel at position <code>index</code>.
	 * <p>
	 * If <code>silent</code> is true, the new channel will be silent.
	 * Otherwise it will contain random data.
	 * <p>
	 * If <code>lazy</code> is true, hidden channels which have at least
	 * getSampleCount() elements will be examined for reusage as inserted
	 * channel.<br>
	 * If <code>lazy</code> is false, still hidden channels are reused, but it
	 * is assured that the inserted channel has exactly getSampleCount()
	 * elements, thus not wasting memory.
	 */
Inserts a channel at position index.

If silent is true, the new channel will be silent.
Otherwise it will contain random data.

If lazy is true, hidden channels which have at least
getSampleCount() elements will be examined for reusage as inserted
channel.
If lazy is false, still hidden channels are reused, but it
is assured that the inserted channel has exactly getSampleCount()
elements, thus not wasting memory.
Inserts a channel at position index . If silent is true the new channel will be silent . Otherwise it will contain random data . If lazy is true hidden channels which have at least getSampleCount () elements will be examined for reusage as inserted channel . If lazy is false still hidden channels are reused but it is assured that the inserted channel has exactly getSampleCount () elements thus not wasting memory .
public void insertChannel(int index, boolean silent, boolean lazy) {
		grow(this.channelCount + 1, true);
		int physSize = channels.length;
		int virtSize = this.channelCount;
		float[] newChannel = null;
		if (physSize > virtSize) {
			for (int ch = virtSize; ch < physSize; ch++) {
				float[] thisChannel = (float[]) channels[ch];
				if (thisChannel != null
						&& ((lazy && thisChannel.length >= getSampleCount()) || (!lazy && thisChannel.length == getSampleCount()))) {
					newChannel = thisChannel;
					channels[ch] = null;
					break;
				}
			}
		}
		if (newChannel == null) {
			newChannel = new float[getSampleCount()];
		}
		for (int i = index; i < virtSize; i++) {
			channels[i + 1] = channels[i];
		}
		channels[index] = newChannel;
		setChannelCountImpl(this.channelCount + 1);
		if (silent) {
			makeSilence(index);
		}
		grow(this.channelCount, lazy);
	}
public void insertChannel ( int index , boolean silent , boolean lazy ) { grow ( this . channelCount + 1 , true ) ; int physSize = channels . length ; int virtSize = this . channelCount ; float [ ] newChannel = null ; if ( physSize > virtSize ) { for ( int ch = virtSize ; ch < physSize ; ch ++ ) { float [ ] thisChannel = ( float [ ] ) channels [ ch ] ; if ( thisChannel != null && ( ( lazy && thisChannel . length >= getSampleCount ( ) ) || ( ! lazy && thisChannel . length == getSampleCount ( ) ) ) ) { newChannel = thisChannel ; channels [ ch ] = null ; break ; } } } if ( newChannel == null ) { newChannel = new float [ getSampleCount ( ) ] ; } for ( int i = index ; i < virtSize ; i ++ ) { channels [ i + 1 ] = channels [ i ] ; } channels [ index ] = newChannel ; setChannelCountImpl ( this . channelCount + 1 ) ; if ( silent ) { makeSilence ( index ) ; } grow ( this . channelCount , lazy ) ; }
Inserts a channel at position <code>index</code>.
Inserts a channel at position <code > index< / code > .
// first grow the array of channels, if necessary. Intentionally lazy // there are hidden channels. Try to use one. // we found a matching channel. Use it ! // move channels after index // if not lazy, remove old channels