annotate lib/legacy_dx/dmusbuff.h @ 137:0afe11853c77

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