home *** CD-ROM | disk | FTP | other *** search
/ Windows 95 Secrets / Secrets2.iso / Audio / WAV / MaplayP / _SETUP.1 / bit_res.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-05-12  |  579 b   |  38 lines

  1. /* bit_res.h
  2.  
  3.     Declarations for Bit Reservoir for Layer III
  4.  
  5.    Adapted from the public c code by Jeff Tsay. */
  6.  
  7.  
  8. #ifndef BIT_RES_H
  9. #define BIT_RES_H
  10.  
  11. #include "all.h"
  12.  
  13. #define BUFSIZE 4096
  14.  
  15. class Bit_Reserve {
  16.  
  17. private:
  18.  
  19.     uint32 offset, totbit, buf_byte_idx;
  20.     uint32 *buf;
  21.     uint32 buf_bit_idx;
  22.    uint32 *putmask;
  23.  
  24. public:
  25.  
  26.     Bit_Reserve();
  27.     ~Bit_Reserve();
  28.  
  29.     uint32 hsstell() { return(totbit); }
  30.     uint32 hgetbits(uint32 N);
  31.     uint32 hget1bit();   
  32.     void hputbuf(int32 val);
  33.  
  34.     void rewindNbits(int32 N);
  35.     void rewindNbytes(int32 N);
  36. };
  37.  
  38. #endif