 // NMLS algorithm
 // inputs are Mic Signal, far end signal and index of n-1 block wher n is the current block itteration
 // previous block data is used to modify current block data samples
-void NLMS_AEC(int16_t *x)
+void NLMS_AEC(int16_t *Mic, int16_t *x)
 {
   int16_t yhat = 0;
   int64_t xtdl = 0;

void getBuffer1();
void playData();
void displayData();
void NLMS_AEC(int16_t *x);

// GUItool: begin automatically generated code
AudioInputI2S            Mic;           //microphone

        //read one 128 block of samples and copy it into array
        memcpy((byte*)pablock+(256*(x-1)),Memory.readBuffer(),256);
        Memory.freeBuffer(); // free buffer memory
//        NLMS_AEC(pablock, pablock);
//        playData(Perror,0); // play 128 block from buffered array
        l = 1; // set n to 1 to get out of while loop
      }//end if 
    }//end while 
    NLMS_AEC(pablock, pablock);
    playData(Perror,0); // play 128 block from buffered array
    l = 0;
   Memory.clear(); // clear all audio memory 
