#include "iolib.h"
#include "dsplib.h"

#define DELAYLEN 2048

float delay[DELAYLEN+1];

void main(void)
{
  float in, out;

  init_21k();
  init_1847(SAMPLE8000, 0);
  initdelay(delay, DELAYLEN);

  for(;;) {
    in = read_input();
    out = storedelay(in, delay, DELAYLEN);
    write_output(out);
  }
}