Exemplo n.º 1
0
 /**
  * Constructs an FFT that will accept sample buffers that are <code>timeSize</code> long and have
  * been recorded with a sample rate of <code>sampleRate</code>. <code>timeSize</code>
  * <em>must</em> be a power of two. This will throw an exception if it is not.
  *
  * @param timeSize the length of the sample buffers you will be analyzing
  * @param sampleRate the sample rate of the audio you will be analyzing
  */
 public FFT(int timeSize, float sampleRate) {
   super(timeSize, sampleRate);
   if ((timeSize & (timeSize - 1)) != 0) {
     throw new IllegalArgumentException("FFT: timeSize must be a power of two.");
   }
   buildReverseTable();
   buildTrigTables();
 }