lib/minim/src/ddf/minim/SignalChain.java
/**
   * Asks all the enabled signals in the chain to generate a left and right
   * buffer of samples, adds the signals together and puts the result in
   * <code>left</code> and <code>right</code>.
   */
Asks all the enabled signals in the chain to generate a left and right
buffer of samples, adds the signals together and puts the result in
left and right.
Asks all the enabled signals in the chain to generate a left and right buffer of samples adds the signals together and puts the result in left and right .
public synchronized void generate(float[] left, float[] right)
  {
	  if ( tmpL == null )
	  {
		  tmpL = new float[left.length];
	  }
	  if ( tmpR == null )
	  {
		  tmpR = new float[right.length];
	  }
    for (int i = 0; i < signals.size(); i++)
    {
      AudioSignal s = signals.get(i);
      if ( enabled.contains(s) )
      {
        s.generate(tmpL, tmpR);
        for (int j = 0; j < left.length; j++)
        {
          left[j] += tmpL[j];
          right[j] += tmpR[j];
        }
      }
    }
    signals.removeAll(signalsToRemove);
    signalsToRemove.removeAllElements(); 
  }
public synchronized void generate ( float [ ] left , float [ ] right ) { if ( tmpL == null ) { tmpL = new float [ left . length ] ; } if ( tmpR == null ) { tmpR = new float [ right . length ] ; } for ( int i = 0 ; i < signals . size ( ) ; i ++ ) { AudioSignal s = signals . get ( i ) ; if ( enabled . contains ( s ) ) { s . generate ( tmpL , tmpR ) ; for ( int j = 0 ; j < left . length ; j ++ ) { left [ j ] += tmpL [ j ] ; right [ j ] += tmpR [ j ] ; } } } signals . removeAll ( signalsToRemove ) ; signalsToRemove . removeAllElements ( ) ; }
Asks all the enabled signals in the chain to generate a left and right
 buffer of samples, adds the signals together and puts the result in
 <code>left</code> and <code>right</code>.
Asks all the enabled signals in the chain to generate a left and right buffer of samples adds the signals together and puts the result in <code > left< / code > and <code > right< / code > .
// now remove signals we have marked for removal