annotate lib/legacy_dx/dmusbuff.h @ 771:fbae3100f991

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