diff options
author | Fire-Head <Fire-Head@users.noreply.github.com> | 2019-06-02 05:00:38 +0200 |
---|---|---|
committer | Fire-Head <Fire-Head@users.noreply.github.com> | 2019-06-02 05:00:38 +0200 |
commit | b1f9e28cd155459ab2843690c248ed9f4767bc3f (patch) | |
tree | 8e7d2a33d4c5109ea3c3562940268afc57d0915c /dxsdk/Include/dmusbuff.h | |
parent | rw skeleton (diff) | |
download | re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar.gz re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar.bz2 re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar.lz re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar.xz re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.tar.zst re3-b1f9e28cd155459ab2843690c248ed9f4767bc3f.zip |
Diffstat (limited to '')
-rw-r--r-- | dxsdk/Include/dmusbuff.h | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/dxsdk/Include/dmusbuff.h b/dxsdk/Include/dmusbuff.h new file mode 100644 index 00000000..54884538 --- /dev/null +++ b/dxsdk/Include/dmusbuff.h @@ -0,0 +1,41 @@ +/*************************************************************************** +* * +* DMusBuff.h -- This module defines the buffer format for DirectMusic * +* Shared file between user mode and kernel mode components * +* * +* Copyright (c) 1998, Microsoft Corp. All rights reserved. * +* * +***************************************************************************/ + +#ifndef _DMusBuff_ +#define _DMusBuff_ + +/* Format of DirectMusic events in a buffer + * + * A buffer contains 1 or more events, each with the following header. + * Immediately following the header is the event data. The header+data + * size is rounded to the nearest quadword (8 bytes). + */ + +#include <pshpack4.h> /* Do not pad at end - that's where the data is */ +typedef struct _DMUS_EVENTHEADER *LPDMUS_EVENTHEADER; +typedef struct _DMUS_EVENTHEADER +{ + DWORD cbEvent; /* Unrounded bytes in event */ + DWORD dwChannelGroup; /* Channel group of event */ + REFERENCE_TIME rtDelta; /* Delta from start time of entire buffer */ + DWORD dwFlags; /* Flags DMUS_EVENT_xxx */ +} DMUS_EVENTHEADER; +#include <poppack.h> + +#define DMUS_EVENT_STRUCTURED 0x00000001 /* Unstructured data (SysEx, etc.) */ + +/* The number of bytes to allocate for an event with 'cb' data bytes. + */ +#define QWORD_ALIGN(x) (((x) + 7) & ~7) +#define DMUS_EVENT_SIZE(cb) QWORD_ALIGN(sizeof(DMUS_EVENTHEADER) + cb) + + +#endif /* _DMusBuff_ */ + + |