comparison lib/legacy_dx/dmusbuff.h @ 0:9c0607679772

init
author Ritor1
date Sat, 12 Jan 2013 09:45:18 +0600
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:9c0607679772
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
10 #ifndef _DMusBuff_
11 #define _DMusBuff_
12
13 /* Format of DirectMusic events in a buffer
14 *
15 * A buffer contains 1 or more events, each with the following header.
16 * Immediately following the header is the event data. The header+data
17 * size is rounded to the nearest quadword (8 bytes).
18 */
19
20 #include <pshpack4.h> /* Do not pad at end - that's where the data is */
21 typedef struct _DMUS_EVENTHEADER *LPDMUS_EVENTHEADER;
22 typedef struct _DMUS_EVENTHEADER
23 {
24 DWORD cbEvent; /* Unrounded bytes in event */
25 DWORD dwChannelGroup; /* Channel group of event */
26 REFERENCE_TIME rtDelta; /* Delta from start time of entire buffer */
27 DWORD dwFlags; /* Flags DMUS_EVENT_xxx */
28 } DMUS_EVENTHEADER;
29 #include <poppack.h>
30
31 #define DMUS_EVENT_STRUCTURED 0x00000001 /* Unstructured data (SysEx, etc.) */
32
33 /* The number of bytes to allocate for an event with 'cb' data bytes.
34 */
35 #define QWORD_ALIGN(x) (((x) + 7) & ~7)
36 #define DMUS_EVENT_SIZE(cb) QWORD_ALIGN(sizeof(DMUS_EVENTHEADER) + cb)
37
38
39 #endif /* _DMusBuff_ */
40
41