home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / audio / midimon / circbuf.h < prev    next >
Encoding:
C/C++ Source or Header  |  1997-10-05  |  1.4 KB  |  39 lines

  1. /**************************************************************************
  2.  *
  3.  *  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4.  *  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5.  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6.  *  PURPOSE.
  7.  *
  8.  *  Copyright (C) 1993 - 1997  Microsoft Corporation.  All Rights Reserved.
  9.  * 
  10.  **************************************************************************/
  11.  
  12. /*
  13.  *  circbuf.h
  14.  */
  15.  
  16.  
  17. /* Structure to manage the circular input buffer.
  18.  */
  19. typedef struct circularBuffer_tag
  20. {
  21.     HANDLE  hSelf;          /* handle to this structure */
  22.     HANDLE  hBuffer;        /* buffer handle */
  23.     WORD    wError;         /* error flags */
  24.     DWORD   dwSize;         /* buffer size (in EVENTS) */
  25.     DWORD   dwCount;        /* byte count (in EVENTS) */
  26.     LPEVENT lpStart;        /* ptr to start of buffer */
  27.     LPEVENT lpEnd;          /* ptr to end of buffer (last byte + 1) */
  28.     LPEVENT lpHead;         /* ptr to head (next location to fill) */
  29.     LPEVENT lpTail;         /* ptr to tail (next location to empty) */
  30. } CIRCULARBUFFER;
  31. typedef CIRCULARBUFFER FAR *LPCIRCULARBUFFER;
  32.  
  33.  
  34. /* Function prototypes
  35.  */
  36. LPCIRCULARBUFFER AllocCircularBuffer(DWORD dwSize);
  37. void FreeCircularBuffer(LPCIRCULARBUFFER lpBuf);
  38. WORD FAR PASCAL GetEvent(LPCIRCULARBUFFER lpBuf, LPEVENT lpEvent);
  39.