Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.7 KiB

  1. /***************************************************************************
  2. * *
  3. * DMusBuff.h -- This module defines the buffer format for DirectMusic *
  4. * Shared file between user mode and kernel mode components *
  5. * *
  6. * Copyright (c) 1998, Microsoft Corp. All rights reserved. *
  7. * *
  8. ***************************************************************************/
  9. #ifndef _DMusBuff_
  10. #define _DMusBuff_
  11. /* Format of DirectMusic events in a buffer
  12. *
  13. * A buffer contains 1 or more events, each with the following header.
  14. * Immediately following the header is the event data. The header+data
  15. * size is rounded to the nearest quadword (8 bytes).
  16. */
  17. #include <pshpack4.h> /* Do not pad at end - that's where the data is */
  18. typedef struct _DMUS_EVENTHEADER *LPDMUS_EVENTHEADER;
  19. typedef struct _DMUS_EVENTHEADER
  20. {
  21. DWORD cbEvent; /* Unrounded bytes in event */
  22. DWORD dwChannelGroup; /* Channel group of event */
  23. REFERENCE_TIME rtDelta; /* Delta from start time of entire buffer */
  24. DWORD dwFlags; /* Flags DMUS_EVENT_xxx */
  25. } DMUS_EVENTHEADER;
  26. #include <poppack.h>
  27. #define DMUS_EVENT_STRUCTURED 0x00000001 /* Unstructured data (SysEx, etc.) */
  28. /* The number of bytes to allocate for an event with 'cb' data bytes.
  29. */
  30. #define QWORD_ALIGN(x) (((x) + 7) & ~7)
  31. #define DMUS_EVENT_SIZE(cb) QWORD_ALIGN(sizeof(DMUS_EVENTHEADER) + cb)
  32. #endif /* _DMusBuff_ */