// 
//  Project: Experiment 7.6.6 Adaptive line predictor - Chapter 7
//  File name: adaptive_predictor.h   
//
//  Description: This is the adaptive line predictor experiment header file
//
//  For the book "Real Time Digital Signal Processing: 
//                Implementation and Application, 2nd Ed"
//                By Sen M. Kuo, Bob H. Lee, and Wenshun Tian
//                Publisher: John Wiley and Sons, Ltd
//

#define L   228               // Adaptive FIR filter order > 128 
#define Ns	1               // Number of input signal per block 256

typedef struct {
  short *in;                  // Pointer to input data
  short *y;                   // Pointer to output data
  short *e;                   // Pointer to error
  short *x;                   // Pointer to data delay line
  short *w;                   // Pointer to coefficients
  short size;                 // Data sample block size
  short order;                // Filter length
  short index;                // Data delay line index for circular buffer
} ADAPTLP;

unsigned short adaptivePredictor(ADAPTLP *alp);
