envelope.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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: PCM data envelope analysis and manipulation
  14. last mod: $Id: envelope.h,v 1.10.2.1 2000/11/04 06:21:44 xiphmont Exp $
  15. ********************************************************************/
  16. #ifndef _V_ENVELOPE_
  17. #define _V_ENVELOPE_
  18. #include "iir.h"
  19. #include "smallft.h"
  20. #define EORDER 16
  21. typedef struct {
  22. int ch;
  23. int winlength;
  24. int searchstep;
  25. float minenergy;
  26. IIR_state *iir;
  27. float **filtered;
  28. long storage;
  29. long current;
  30. drft_lookup drft;
  31. float *window;
  32. } envelope_lookup;
  33. extern void _ve_envelope_init(envelope_lookup *e,vorbis_info *vi);
  34. extern void _ve_envelope_clear(envelope_lookup *e);
  35. extern long _ve_envelope_search(vorbis_dsp_state *v,long searchpoint);
  36. extern void _ve_envelope_shift(envelope_lookup *e,long shift);
  37. #endif