decoder.h 668 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. class Shaper;
  2. class Decoder
  3. {
  4. private:
  5. void process_rg();
  6. void setup_mc();
  7. float* bptr;
  8. float** pcmbuf;
  9. Shaper * shaper;
  10. UINT data,pos;
  11. float scale;
  12. int cur_link;
  13. int cur_preamp;
  14. int clipmin,clipmax;
  15. public:
  16. VorbisFile * file;
  17. UINT nch,sr,kbps,bps,src_nch;
  18. Decoder()
  19. {
  20. memset(this,0,sizeof(*this));
  21. }
  22. ~Decoder();
  23. int Seek(double p);
  24. int Read(UINT bytes,void * buf);
  25. void Flush();
  26. void Init(VorbisFile * f, UINT _bits=0, UINT _nch=0, bool _useFloat=false, bool allowRG=true);
  27. void wa2_setinfo(UINT cur_bitrate);
  28. UINT DataAvailable();
  29. int DoFrame();
  30. bool need_reopen;
  31. int play_init();
  32. bool play_inited;
  33. bool dither;
  34. bool useFloat;
  35. };