home *** CD-ROM | disk | FTP | other *** search
/ Windows 95 Secrets / Secrets2.iso / Audio / WAV / MaplayP / _SETUP.1 / mci_obuf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-06-17  |  1.0 KB  |  57 lines

  1. /* mci_obuf.h
  2.  
  3.    Obuffer implementation for Win32. Written by Jeff Tsay. */
  4.  
  5. #ifndef MCI_OBUF_H
  6. #define MCI_OBUF_H
  7.  
  8. #ifdef  __WIN32__
  9. #define STRICT
  10. #include <windows.h>
  11.  
  12. #include "all.h"
  13. #include "header.h"
  14. #include "args.h"
  15. #include "obuffer.h"
  16.  
  17. #define TWO_TIMES   5
  18. static const uint32 BUFFERSIZE = OBUFFERSIZE << TWO_TIMES;
  19. #define BIT_SELECT  0x1f
  20.  
  21. #define SLEEPTIME   20
  22.  
  23. // MCIbuffer class written by Jeff Tsay
  24.  
  25. class MCIbuffer : public Obuffer
  26. {
  27. private:
  28.   uint32 bufferp[MAXCHANNELS];
  29.   uint32 channels;
  30.   tWAVEFORMATEX *lpwf;
  31.   LPWAVEHDR* lpwavehdr_arr;
  32.   HWAVEOUT *phwo;
  33.   uint32 buffer_count;
  34.   uint32 hdr_size;
  35.   uint32 fillup;
  36.   DWORD data_size;
  37.   uint32 user_stop;
  38.  
  39.   void   wave_swap();
  40.  
  41. public:
  42.     MCIbuffer(uint32 number_of_channels, MPEG_Args *maplay_args);
  43.     ~MCIbuffer();
  44.  
  45.   void    append(uint32 channel, int16 value);
  46.   void    write_buffer(int32 fd);
  47.  
  48. #ifdef SEEK_STOP
  49.   void   clear_buffer();
  50.   void   set_stop_flag();
  51. #endif
  52.  
  53. };
  54.  
  55. #endif // __WIN32__
  56. #endif // MCI_OBUFFER_H
  57.