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