Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.88 KB | None | 0 0
  1. for (int i = 0; i < floatArray.Length - (BLOCKLENGTH - 1); i += BLOCKLENGTH) {
  2.  
  3.                     // make array (empty again), with same length, for calculations
  4.                     soundArray = new float[floatArray.Length];
  5.  
  6.                     // nextSoundIndex will (again ) be set
  7.                     CheckForSound();
  8.  
  9.                     // filling tempArray with 4096 samples of a founded sound
  10.                     for (int j = 0; j < tempBlock.Length; j++) {
  11.                         tempBlock[j] = floatArray[i + j];
  12.                     }
  13.  
  14.                     // get complex number's of one block
  15.                     Fourier.RFFT(tempBlock, FourierDirection.Forward);
  16.  
  17.                     // set modulus Array
  18.                     CalculateModulus(resolution);
  19.  
  20.  
  21.                     // check for matches
  22.                     CheckModulusForNumber(resolution);
  23.                 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement