iir.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /********************************************************************
  2. * *
  3. * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE. *
  4. * USE, DISTRIBUTION AND REPRODUCTION OF THIS SOURCE IS GOVERNED BY *
  5. * THE GNU LESSER/LIBRARY PUBLIC LICENSE, WHICH IS INCLUDED WITH *
  6. * THIS SOURCE. PLEASE READ THESE TERMS BEFORE DISTRIBUTING. *
  7. * *
  8. * THE OggVorbis 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.2.2.2 2000/11/04 10:24:15 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. int ring;
  24. float gain;
  25. } IIR_state;
  26. extern void IIR_init(IIR_state *s,int stages,float gain, float *A, float *B);
  27. extern void IIR_clear(IIR_state *s);
  28. extern float IIR_filter(IIR_state *s,float in);
  29. extern float IIR_filter_ChebBand(IIR_state *s,float in);
  30. extern void IIR_clamp(IIR_state *s,float thresh);
  31. #endif