shaper.h 499 B

123456789101112131415161718192021222324252627282930
  1. //from SSRC
  2. #ifndef NULLSOFT_VORBIS_SHAPER_H
  3. #define NULLSOFT_VORBIS_SHAPER_H
  4. #include "main.h"
  5. typedef float REAL;
  6. enum
  7. {
  8. DITHER_RECTANGLE=0,
  9. DITHER_TRIANGLE=1,
  10. DITHER_GAUSSIAN=2,
  11. };
  12. class Shaper
  13. {
  14. double **shapebuf;
  15. int shaper_type,shaper_len,shaper_clipmin,shaper_clipmax;
  16. REAL *randbuf;
  17. int randptr;
  18. int dtype;
  19. int nch;
  20. public:
  21. Shaper(int freq,int _nch,int min,int max,int _dtype,int pdf,double noiseamp);
  22. int do_shaping(double s,/*double *peak,*/int ch);
  23. ~Shaper();
  24. };
  25. #endif