iir.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /********************************************************************
  2. * *
  3. * THIS FILE IS PART OF THE Ogg Vorbis SOFTWARE CODEC SOURCE CODE. *
  4. * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
  5. * THE GNU PUBLIC LICENSE 2, WHICH IS INCLUDED WITH THIS SOURCE. *
  6. * PLEASE READ THESE TERMS DISTRIBUTING. *
  7. * *
  8. * THE OggSQUISH SOURCE CODE IS (C) COPYRIGHT 1994-2000 *
  9. * by Monty <monty@xiph.org> and The XIPHOPHORUS Company *
  10. * http://www.xiph.org/ *
  11. * *
  12. ********************************************************************
  13. function: Direct Form I, II IIR filters, plus some specializations
  14. last mod: $Id: iir.h,v 1.1.4.1 2000/08/31 09:00:00 xiphmont Exp $
  15. ********************************************************************/
  16. #ifndef _V_IIR_H_
  17. #define _V_IIR_H_
  18. typedef struct {
  19. int stages;
  20. float *coeff_A;
  21. float *coeff_B;
  22. float *z_A;
  23. float *z_B;
  24. int ring;
  25. float gain;
  26. } IIR_state;
  27. void IIR_init(IIR_state *s,int stages,float gain, float *A, float *B);
  28. void IIR_clear(IIR_state *s);
  29. float IIR_filter(IIR_state *s,float in);
  30. float IIR_filter_ChebBand(IIR_state *s,float in);
  31. #endif