From 9f8bb1becc87ddf54dbe1531fc56770fc2e6e5ab Mon Sep 17 00:00:00 2001 From: Kamil Hornicek Date: Mon, 25 May 2009 14:49:04 +0000 Subject: [PATCH] - dls1.h, dmdls.h, dmusics.h: fix typos, add missing definitions - import dmerror.h, dmplugin.h, dmusicc.h, dmusicf.h, dmusici.h from Wine svn path=/trunk/; revision=41118 --- reactos/include/dxsdk/dls1.h | 5 + reactos/include/dxsdk/dmdls.h | 4 +- reactos/include/dxsdk/dmerror.h | 164 +++ reactos/include/dxsdk/dmplugin.h | 301 ++++++ reactos/include/dxsdk/dmusicc.h | 768 +++++++++++++ reactos/include/dxsdk/dmusicf.h | 911 ++++++++++++++++ reactos/include/dxsdk/dmusici.h | 1738 ++++++++++++++++++++++++++++++ reactos/include/dxsdk/dmusics.h | 63 +- 8 files changed, 3943 insertions(+), 11 deletions(-) create mode 100644 reactos/include/dxsdk/dmerror.h create mode 100644 reactos/include/dxsdk/dmplugin.h create mode 100644 reactos/include/dxsdk/dmusicc.h create mode 100644 reactos/include/dxsdk/dmusicf.h create mode 100644 reactos/include/dxsdk/dmusici.h diff --git a/reactos/include/dxsdk/dls1.h b/reactos/include/dxsdk/dls1.h index fea53bbf76d..be34905f7c4 100644 --- a/reactos/include/dxsdk/dls1.h +++ b/reactos/include/dxsdk/dls1.h @@ -92,6 +92,11 @@ typedef struct _DLSID BYTE abData4[8]; } DLSID, FAR *LPDLSID; +typedef struct _MIDILOCALE { + ULONG ulBank; + ULONG ulInstrument; +} MIDILOCALE, *LPMIDILOCALE; + typedef struct _INSTHEADER { ULONG cRegions; diff --git a/reactos/include/dxsdk/dmdls.h b/reactos/include/dxsdk/dmdls.h index e0cf2d72155..c67ac1744e5 100644 --- a/reactos/include/dxsdk/dmdls.h +++ b/reactos/include/dxsdk/dmdls.h @@ -1,4 +1,4 @@ -ifndef _DMDLS_ +#ifndef _DMDLS_ #define _DMDLS_ #include "dls1.h" @@ -20,7 +20,7 @@ typedef long PERCENT; typedef LONGLONG REFERENCE_TIME; typedef REFERENCE_TIME *LPREFERENCE_TIME; -#ifndef MAKE_FOURCC +#ifndef MAKEFOURCC #define MAKEFOURCC(ch0, ch1, ch2, ch3) ((DWORD)(BYTE)(ch0) | ((DWORD)(BYTE)(ch1) << 8) | ((DWORD)(BYTE)(ch2) << 16) | ((DWORD)(BYTE)(ch3) << 24 )) typedef DWORD FOURCC; #endif diff --git a/reactos/include/dxsdk/dmerror.h b/reactos/include/dxsdk/dmerror.h new file mode 100644 index 00000000000..8db25100d83 --- /dev/null +++ b/reactos/include/dxsdk/dmerror.h @@ -0,0 +1,164 @@ +/* DirectMusic Error Codes + * + * Copyright (C) 2003-2004 Rok Mandeljc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_DMUSIC_ERROR_H +#define __WINE_DMUSIC_ERROR_H + +/***************************************************************************** + * Error code handling + */ +#define FACILITY_DIRECTMUSIC 0x878 +#define DMUS_ERRBASE 0x1000 + +#ifndef MAKE_HRESULT +#define MAKE_HRESULT(sev,fac,code) \ + ((HRESULT) (((ULONG)(sev)<<31) | ((ULONG)(fac)<<16) | ((ULONG)(code))) ) +#endif + +#define MAKE_DMHRESULTSUCCESS(code) MAKE_HRESULT(0, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code))) +#define MAKE_DMHRESULTERROR(code) MAKE_HRESULT(1, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code))) + +/***************************************************************************** + * Error codes + */ + +#define DMUS_S_PARTIALLOAD MAKE_DMHRESULTSUCCESS(0x091) +#define DMUS_S_PARTIALDOWNLOAD MAKE_DMHRESULTSUCCESS(0x092) +#define DMUS_S_REQUEUE MAKE_DMHRESULTSUCCESS(0x200) +#define DMUS_S_FREE MAKE_DMHRESULTSUCCESS(0x201) +#define DMUS_S_END MAKE_DMHRESULTSUCCESS(0x202) +#define DMUS_S_STRING_TRUNCATED MAKE_DMHRESULTSUCCESS(0x210) +#define DMUS_S_LAST_TOOL MAKE_DMHRESULTSUCCESS(0x211) +#define DMUS_S_OVER_CHORD MAKE_DMHRESULTSUCCESS(0x212) +#define DMUS_S_UP_OCTAVE MAKE_DMHRESULTSUCCESS(0x213) +#define DMUS_S_DOWN_OCTAVE MAKE_DMHRESULTSUCCESS(0x214) +#define DMUS_S_NOBUFFERCONTROL MAKE_DMHRESULTSUCCESS(0x215) +#define DMUS_S_GARBAGE_COLLECTED MAKE_DMHRESULTSUCCESS(0x216) + +#define DMUS_E_DRIVER_FAILED MAKE_DMHRESULTERROR(0x0101) +#define DMUS_E_PORTS_OPEN MAKE_DMHRESULTERROR(0x0102) +#define DMUS_E_DEVICE_IN_USE MAKE_DMHRESULTERROR(0x0103) +#define DMUS_E_INSUFFICIENTBUFFER MAKE_DMHRESULTERROR(0x0104) +#define DMUS_E_BUFFERNOTSET MAKE_DMHRESULTERROR(0x0105) +#define DMUS_E_BUFFERNOTAVAILABLE MAKE_DMHRESULTERROR(0x0106) +#define DMUS_E_NOTADLSCOL MAKE_DMHRESULTERROR(0x0108) +#define DMUS_E_INVALIDOFFSET MAKE_DMHRESULTERROR(0x0109) +#define DMUS_E_ALREADY_LOADED MAKE_DMHRESULTERROR(0x0111) +#define DMUS_E_INVALIDPOS MAKE_DMHRESULTERROR(0x0113) +#define DMUS_E_INVALIDPATCH MAKE_DMHRESULTERROR(0x0114) +#define DMUS_E_CANNOTSEEK MAKE_DMHRESULTERROR(0x0115) +#define DMUS_E_CANNOTWRITE MAKE_DMHRESULTERROR(0x0116) +#define DMUS_E_CHUNKNOTFOUND MAKE_DMHRESULTERROR(0x0117) +#define DMUS_E_INVALID_DOWNLOADID MAKE_DMHRESULTERROR(0x0119) +#define DMUS_E_NOT_DOWNLOADED_TO_PORT MAKE_DMHRESULTERROR(0x0120) +#define DMUS_E_ALREADY_DOWNLOADED MAKE_DMHRESULTERROR(0x0121) +#define DMUS_E_UNKNOWN_PROPERTY MAKE_DMHRESULTERROR(0x0122) +#define DMUS_E_SET_UNSUPPORTED MAKE_DMHRESULTERROR(0x0123) +#define DMUS_E_GET_UNSUPPORTED MAKE_DMHRESULTERROR(0x0124) +#define DMUS_E_NOTMONO MAKE_DMHRESULTERROR(0x0125) +#define DMUS_E_BADARTICULATION MAKE_DMHRESULTERROR(0x0126) +#define DMUS_E_BADINSTRUMENT MAKE_DMHRESULTERROR(0x0127) +#define DMUS_E_BADWAVELINK MAKE_DMHRESULTERROR(0x0128) +#define DMUS_E_NOARTICULATION MAKE_DMHRESULTERROR(0x0129) +#define DMUS_E_NOTPCM MAKE_DMHRESULTERROR(0x012A) +#define DMUS_E_BADWAVE MAKE_DMHRESULTERROR(0x012B) +#define DMUS_E_BADOFFSETTABLE MAKE_DMHRESULTERROR(0x012C) +#define DMUS_E_UNKNOWNDOWNLOAD MAKE_DMHRESULTERROR(0x012D) +#define DMUS_E_NOSYNTHSINK MAKE_DMHRESULTERROR(0x012E) +#define DMUS_E_ALREADYOPEN MAKE_DMHRESULTERROR(0x012F) +#define DMUS_E_ALREADYCLOSED MAKE_DMHRESULTERROR(0x0130) +#define DMUS_E_SYNTHNOTCONFIGURED MAKE_DMHRESULTERROR(0x0131) +#define DMUS_E_SYNTHACTIVE MAKE_DMHRESULTERROR(0x0132) +#define DMUS_E_CANNOTREAD MAKE_DMHRESULTERROR(0x0133) +#define DMUS_E_DMUSIC_RELEASED MAKE_DMHRESULTERROR(0x0134) +#define DMUS_E_BUFFER_EMPTY MAKE_DMHRESULTERROR(0x0135) +#define DMUS_E_BUFFER_FULL MAKE_DMHRESULTERROR(0x0136) +#define DMUS_E_PORT_NOT_CAPTURE MAKE_DMHRESULTERROR(0x0137) +#define DMUS_E_PORT_NOT_RENDER MAKE_DMHRESULTERROR(0x0138) +#define DMUS_E_DSOUND_NOT_SET MAKE_DMHRESULTERROR(0x0139) +#define DMUS_E_ALREADY_ACTIVATED MAKE_DMHRESULTERROR(0x013A) +#define DMUS_E_INVALIDBUFFER MAKE_DMHRESULTERROR(0x013B) +#define DMUS_E_WAVEFORMATNOTSUPPORTED MAKE_DMHRESULTERROR(0x013C) +#define DMUS_E_SYNTHINACTIVE MAKE_DMHRESULTERROR(0x013D) +#define DMUS_E_DSOUND_ALREADY_SET MAKE_DMHRESULTERROR(0x013E) +#define DMUS_E_INVALID_EVENT MAKE_DMHRESULTERROR(0x013F) +#define DMUS_E_UNSUPPORTED_STREAM MAKE_DMHRESULTERROR(0x0150) +#define DMUS_E_ALREADY_INITED MAKE_DMHRESULTERROR(0x0151) +#define DMUS_E_INVALID_BAND MAKE_DMHRESULTERROR(0x0152) +#define DMUS_E_TRACK_HDR_NOT_FIRST_CK MAKE_DMHRESULTERROR(0x0155) +#define DMUS_E_TOOL_HDR_NOT_FIRST_CK MAKE_DMHRESULTERROR(0x0156) +#define DMUS_E_INVALID_TRACK_HDR MAKE_DMHRESULTERROR(0x0157) +#define DMUS_E_INVALID_TOOL_HDR MAKE_DMHRESULTERROR(0x0158) +#define DMUS_E_ALL_TOOLS_FAILED MAKE_DMHRESULTERROR(0x0159) +#define DMUS_E_ALL_TRACKS_FAILED MAKE_DMHRESULTERROR(0x0160) +#define DMUS_E_NOT_FOUND MAKE_DMHRESULTERROR(0x0161) +#define DMUS_E_NOT_INIT MAKE_DMHRESULTERROR(0x0162) +#define DMUS_E_TYPE_DISABLED MAKE_DMHRESULTERROR(0x0163) +#define DMUS_E_TYPE_UNSUPPORTED MAKE_DMHRESULTERROR(0x0164) +#define DMUS_E_TIME_PAST MAKE_DMHRESULTERROR(0x0165) +#define DMUS_E_TRACK_NOT_FOUND MAKE_DMHRESULTERROR(0x0166) +#define DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT MAKE_DMHRESULTERROR(0x0167) +#define DMUS_E_NO_MASTER_CLOCK MAKE_DMHRESULTERROR(0x0170) +#define DMUS_E_LOADER_NOCLASSID MAKE_DMHRESULTERROR(0x0180) +#define DMUS_E_LOADER_BADPATH MAKE_DMHRESULTERROR(0x0181) +#define DMUS_E_LOADER_FAILEDOPEN MAKE_DMHRESULTERROR(0x0182) +#define DMUS_E_LOADER_FORMATNOTSUPPORTED MAKE_DMHRESULTERROR(0x0183) +#define DMUS_E_LOADER_FAILEDCREATE MAKE_DMHRESULTERROR(0x0184) +#define DMUS_E_LOADER_OBJECTNOTFOUND MAKE_DMHRESULTERROR(0x0185) +#define DMUS_E_LOADER_NOFILENAME MAKE_DMHRESULTERROR(0x0186) +#define DMUS_E_INVALIDFILE MAKE_DMHRESULTERROR(0x0200) +#define DMUS_E_ALREADY_EXISTS MAKE_DMHRESULTERROR(0x0201) +#define DMUS_E_OUT_OF_RANGE MAKE_DMHRESULTERROR(0x0202) +#define DMUS_E_SEGMENT_INIT_FAILED MAKE_DMHRESULTERROR(0x0203) +#define DMUS_E_ALREADY_SENT MAKE_DMHRESULTERROR(0x0204) +#define DMUS_E_CANNOT_FREE MAKE_DMHRESULTERROR(0x0205) +#define DMUS_E_CANNOT_OPEN_PORT MAKE_DMHRESULTERROR(0x0206) +#define DMUS_E_CANNOT_CONVERT MAKE_DMHRESULTERROR(0x0207) +#define DMUS_E_DESCEND_CHUNK_FAIL MAKE_DMHRESULTERROR(0x0210) +#define DMUS_E_NOT_LOADED MAKE_DMHRESULTERROR(0x0211) +#define DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE MAKE_DMHRESULTERROR(0x0213) +#define DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE MAKE_DMHRESULTERROR(0x0214) +#define DMUS_E_SCRIPT_ERROR_IN_SCRIPT MAKE_DMHRESULTERROR(0x0215) +#define DMUS_E_SCRIPT_CANTLOAD_OLEAUT32 MAKE_DMHRESULTERROR(0x0216) +#define DMUS_E_SCRIPT_LOADSCRIPT_ERROR MAKE_DMHRESULTERROR(0x0217) +#define DMUS_E_SCRIPT_INVALID_FILE MAKE_DMHRESULTERROR(0x0218) +#define DMUS_E_INVALID_SCRIPTTRACK MAKE_DMHRESULTERROR(0x0219) +#define DMUS_E_SCRIPT_VARIABLE_NOT_FOUND MAKE_DMHRESULTERROR(0x021A) +#define DMUS_E_SCRIPT_ROUTINE_NOT_FOUND MAKE_DMHRESULTERROR(0x021B) +#define DMUS_E_SCRIPT_CONTENT_READONLY MAKE_DMHRESULTERROR(0x021C) +#define DMUS_E_SCRIPT_NOT_A_REFERENCE MAKE_DMHRESULTERROR(0x021D) +#define DMUS_E_SCRIPT_VALUE_NOT_SUPPORTED MAKE_DMHRESULTERROR(0x021E) +#define DMUS_E_INVALID_SEGMENTTRIGGERTRACK MAKE_DMHRESULTERROR(0x0220) +#define DMUS_E_INVALID_LYRICSTRACK MAKE_DMHRESULTERROR(0x0221) +#define DMUS_E_INVALID_PARAMCONTROLTRACK MAKE_DMHRESULTERROR(0x0222) +#define DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR MAKE_DMHRESULTERROR(0x0223) +#define DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR MAKE_DMHRESULTERROR(0x0224) +#define DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE MAKE_DMHRESULTERROR(0x0225) +#define DMUS_E_AUDIOPATHS_NOT_VALID MAKE_DMHRESULTERROR(0x0226) +#define DMUS_E_AUDIOPATHS_IN_USE MAKE_DMHRESULTERROR(0x0227) +#define DMUS_E_NO_AUDIOPATH_CONFIG MAKE_DMHRESULTERROR(0x0228) +#define DMUS_E_AUDIOPATH_INACTIVE MAKE_DMHRESULTERROR(0x0229) +#define DMUS_E_AUDIOPATH_NOBUFFER MAKE_DMHRESULTERROR(0x022A) +#define DMUS_E_AUDIOPATH_NOPORT MAKE_DMHRESULTERROR(0x022B) +#define DMUS_E_NO_AUDIOPATH MAKE_DMHRESULTERROR(0x022C) +#define DMUS_E_INVALIDCHUNK MAKE_DMHRESULTERROR(0x022D) +#define DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER MAKE_DMHRESULTERROR(0x022E) +#define DMUS_E_INVALID_CONTAINER_OBJECT MAKE_DMHRESULTERROR(0x022F) + +#endif /* __WINE_DMUSIC_ERROR_H */ diff --git a/reactos/include/dxsdk/dmplugin.h b/reactos/include/dxsdk/dmplugin.h new file mode 100644 index 00000000000..6cf3114aebb --- /dev/null +++ b/reactos/include/dxsdk/dmplugin.h @@ -0,0 +1,301 @@ +/* + * DirectMusic Performance Layer Plugins API + * + * Copyright (C) 2003-2004 Rok Mandeljc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_DMUSIC_PLUGIN_H +#define __WINE_DMUSIC_PLUGIN_H + +#ifndef __WINESRC__ +#include +#endif /* __WINESRC__ */ + +#define COM_NO_WINDOWS_H +#include +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/***************************************************************************** + * Registry path + */ +#define DMUS_REGSTR_PATH_TOOLS "Software\\Microsoft\\DirectMusic\\Tools" + + +/***************************************************************************** + * Predeclare the interfaces + */ +/* CLSIDs */ +DEFINE_GUID(CLSID_DirectMusicBandTrack, 0xd2ac2894,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicChordTrack, 0xd2ac288b,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicChordMapTrack, 0xd2ac2896,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicCommandTrack, 0xd2ac288c,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicLyricsTrack, 0x995c1cf5,0x54ff,0x11d3,0x8b,0xda,0x00,0x60,0x08,0x93,0xb1,0xb6); +DEFINE_GUID(CLSID_DirectMusicMarkerTrack, 0x55a8fd00,0x4288,0x11d3,0x9b,0xd1,0x8a,0x0d,0x61,0xc8,0x88,0x35); +DEFINE_GUID(CLSID_DirectMusicMotifTrack, 0xd2ac288e,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicMuteTrack, 0xd2ac2898,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicParamControlTrack, 0x4be0537b,0x5c19,0x11d3,0x8b,0xdc,0x00,0x60,0x08,0x93,0xb1,0xb6); +DEFINE_GUID(CLSID_DirectMusicScriptTrack, 0x4108fa85,0x3586,0x11d3,0x8b,0xd7,0x00,0x60,0x08,0x93,0xb1,0xb6); +DEFINE_GUID(CLSID_DirectMusicSegmentTriggerTrack, 0xbae4d665,0x4ea1,0x11d3,0x8b,0xda,0x00,0x60,0x08,0x93,0xb1,0xb6); +DEFINE_GUID(CLSID_DirectMusicSeqTrack, 0xd2ac2886,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicSignPostTrack, 0xf17e8672,0xc3b4,0x11d1,0x87,0x0b,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicStyleTrack, 0xd2ac288d,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicSysExTrack, 0xd2ac2887,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicTempoTrack, 0xd2ac2885,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicTimeSigTrack, 0xd2ac2888,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicWaveTrack, 0xeed36461,0x9ea5,0x11d3,0x9b,0xd1,0x00,0x80,0xc7,0x15,0x0a,0x74); +/* MS doesn't support this in DX 9.0 and newer... but there's no harm in keeping it around */ +DEFINE_GUID(CLSID_DirectMusicMelodyFormulationTrack, 0xb0684266,0xb57f,0x11d2,0x97,0xf9,0x00,0xc0,0x4f,0xa3,0x6e,0x58); + +/* IIDs */ +DEFINE_GUID(IID_IDirectMusicTool, 0xd2ac28ba,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicTool8, 0x0e674303,0x3b05,0x11d3,0x9b,0xd1,0xf9,0xe7,0xf0,0xa0,0x15,0x36); +DEFINE_GUID(IID_IDirectMusicTrack, 0xf96029a1,0x4282,0x11d2,0x87,0x17,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicTrack8, 0x0e674304,0x3b05,0x11d3,0x9b,0xd1,0xf9,0xe7,0xf0,0xa0,0x15,0x36); + +/* typedef definitions */ +typedef struct IDirectMusicTrack *LPDIRECTMUSICTRACK; +typedef struct IDirectMusicTrack8 *LPDIRECTMUSICTRACK8; +typedef struct IDirectMusicTool *LPDIRECTMUSICTOOL; +typedef struct IDirectMusicTool8 *LPDIRECTMUSICTOOL8; +/* these are from dmusici.h and are needed here */ +typedef struct IDirectMusicPerformance *LPDIRECTMUSICPERFORMANCE; +typedef struct IDirectMusicPerformance8 *LPDIRECTMUSICPERFORMANCE8; +typedef struct IDirectMusicSegment *LPDIRECTMUSICSEGMENT; +typedef struct IDirectMusicSegment8 *LPDIRECTMUSICSEGMENT8; +typedef struct IDirectMusicSegmentState *LPDIRECTMUSICSEGMENTSTATE; +typedef struct IDirectMusicSegmentState8 *LPDIRECTMUSICSEGMENTSTATE8; +typedef struct IDirectMusicGraph *LPDIRECTMUSICGRAPH; +typedef struct IDirectMusicGraph IDirectMusicGraph8, *LPDIRECTMUSICGRAPH8; + + +/***************************************************************************** + * Typedef definitions + */ +typedef struct _DMUS_PMSG DMUS_PMSG; +typedef LONG MUSIC_TIME; + + +/***************************************************************************** + * Flags + */ +#define DMUS_TRACK_PARAMF_CLOCK 0x1 + +/***************************************************************************** + * Enumerations + */ +/* typedef definitions */ +typedef enum enumDMUS_TRACKF_FLAGS DMUS_TRACKF_FLAGS; + +/* actual enumerations */ +enum enumDMUS_TRACKF_FLAGS { + DMUS_TRACKF_SEEK = 0x001, + DMUS_TRACKF_LOOP = 0x002, + DMUS_TRACKF_START = 0x004, + DMUS_TRACKF_FLUSH = 0x008, + DMUS_TRACKF_DIRTY = 0x010, + DMUS_TRACKF_NOTIFY_OFF = 0x020, + DMUS_TRACKF_PLAY_OFF = 0x040, + DMUS_TRACKF_LOOPEND = 0x080, + DMUS_TRACKF_STOP = 0x100, + DMUS_TRACKF_RECOMPOSE = 0x200, + DMUS_TRACKF_CLOCK = 0x400, +}; + +/***************************************************************************** + * IDirectMusicTool interface + */ +#define INTERFACE IDirectMusicTool +DECLARE_INTERFACE_(IDirectMusicTool,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicTool methods ***/ + STDMETHOD(Init)(THIS_ struct IDirectMusicGraph *pGraph) PURE; + STDMETHOD(GetMsgDeliveryType)(THIS_ DWORD *pdwDeliveryType) PURE; + STDMETHOD(GetMediaTypeArraySize)(THIS_ DWORD *pdwNumElements) PURE; + STDMETHOD(GetMediaTypes)(THIS_ DWORD **padwMediaTypes, DWORD dwNumElements) PURE; + STDMETHOD(ProcessPMsg)(THIS_ struct IDirectMusicPerformance *pPerf, DMUS_PMSG *pPMSG) PURE; + STDMETHOD(Flush)(THIS_ struct IDirectMusicPerformance *pPerf, DMUS_PMSG *pPMSG, REFERENCE_TIME rtTime) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicTool_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicTool_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicTool_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicTool methods ***/ +#define IDirectMusicTool_Init(p,a) (p)->lpVtbl->Init(p,a) +#define IDirectMusicTool_GetMsgDeliveryType(p,a) (p)->lpVtbl->GetMsgDeliveryType(p,a) +#define IDirectMusicTool_GetMediaTypeArraySize(p,a) (p)->lpVtbl->GetMediaTypeArraySize(p,a) +#define IDirectMusicTool_GetMediaTypes(p,a,b) (p)->lpVtbl->GetMediaTypes(p,a,b) +#define IDirectMusicTool_ProcessPMsg(p,a,b) (p)->lpVtbl->ProcessPMsg(p,a,b) +#define IDirectMusicTool_Flush(p,a,b,c) (p)->lpVtbl->Flush(p,a,b,c) +#endif + + +/***************************************************************************** + * IDirectMusicTool8 interface + */ +#define INTERFACE IDirectMusicTool8 +DECLARE_INTERFACE_(IDirectMusicTool8,IDirectMusicTool) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicTool methods ***/ + STDMETHOD(Init)(THIS_ struct IDirectMusicGraph *pGraph) PURE; + STDMETHOD(GetMsgDeliveryType)(THIS_ DWORD *pdwDeliveryType) PURE; + STDMETHOD(GetMediaTypeArraySize)(THIS_ DWORD *pdwNumElements) PURE; + STDMETHOD(GetMediaTypes)(THIS_ DWORD **padwMediaTypes, DWORD dwNumElements) PURE; + STDMETHOD(ProcessPMsg)(THIS_ struct IDirectMusicPerformance *pPerf, DMUS_PMSG *pPMSG) PURE; + STDMETHOD(Flush)(THIS_ struct IDirectMusicPerformance *pPerf, DMUS_PMSG *pPMSG, REFERENCE_TIME rtTime) PURE; + /*** IDirectMusicTool8 methods ***/ + STDMETHOD(Clone)(THIS_ IDirectMusicTool **ppTool) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicTool8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicTool8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicTool8_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicTool methods ***/ +#define IDirectMusicTool8_Init(p,a) (p)->lpVtbl->Init(p,a) +#define IDirectMusicTool8_GetMsgDeliveryType(p,a) (p)->lpVtbl->GetMsgDeliveryType(p,a) +#define IDirectMusicTool8_GetMediaTypeArraySize(p,a) (p)->lpVtbl->GetMediaTypeArraySize(p,a) +#define IDirectMusicTool8_GetMediaTypes(p,a,b) (p)->lpVtbl->GetMediaTypes(p,a,b) +#define IDirectMusicTool8_ProcessPMsg(p,a,b) (p)->lpVtbl->ProcessPMsg(p,a,b) +#define IDirectMusicTool8_Flush(p,a,b) (p)->lpVtbl->Flush(p,a,b) +/*** IDirectMusicTool8 methods ***/ +#define IDirectMusicTool8_Clone(p,a) (p)->lpVtbl->Clone(p,a) +#endif + + +/***************************************************************************** + * IDirectMusicTrack interface + */ +#define INTERFACE IDirectMusicTrack +DECLARE_INTERFACE_(IDirectMusicTrack,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicTrack methods ***/ + STDMETHOD(Init)(THIS_ struct IDirectMusicSegment *pSegment) PURE; + STDMETHOD(InitPlay)(THIS_ struct IDirectMusicSegmentState *pSegmentState, struct IDirectMusicPerformance *pPerformance, void **ppStateData, DWORD dwVirtualTrackID, DWORD dwFlags) PURE; + STDMETHOD(EndPlay)(THIS_ void *pStateData) PURE; + STDMETHOD(Play)(THIS_ void *pStateData, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, MUSIC_TIME mtOffset, DWORD dwFlags, struct IDirectMusicPerformance *pPerf, struct IDirectMusicSegmentState *pSegSt, DWORD dwVirtualID) PURE; + STDMETHOD(GetParam)(THIS_ REFGUID rguidType, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) PURE; + STDMETHOD(SetParam)(THIS_ REFGUID rguidType, MUSIC_TIME mtTime, void *pParam) PURE; + STDMETHOD(IsParamSupported)(THIS_ REFGUID rguidType) PURE; + STDMETHOD(AddNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(RemoveNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(Clone)(THIS_ MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicTrack **ppTrack) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicTrack_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicTrack_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicTrack_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicTrack methods ***/ +#define IDirectMusicTrack_Init(p,a) (p)->lpVtbl->Init(p,a) +#define IDirectMusicTrack_InitPlay(p,a,b,c,d,e) (p)->lpVtbl->InitPlay(p,a,b,c,d,e) +#define IDirectMusicTrack_EndPlay(p,a) (p)->lpVtbl->EndPlay(p,a) +#define IDirectMusicTrack_Play(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Play(p,a,b,c,d,e,f,g,h) +#define IDirectMusicTrack_GetParam(p,a,b,c,d) (p)->lpVtbl->GetParam(p,a,b,c,d) +#define IDirectMusicTrack_SetParam(p,a,b,c) (p)->lpVtbl->SetParam(p,a,b,c) +#define IDirectMusicTrack_IsParamSupported(p,a) (p)->lpVtbl->IsParamSupported(p,a) +#define IDirectMusicTrack_AddNotificationType(p,a) (p)->lpVtbl->AddNotificationType(p,a) +#define IDirectMusicTrack_RemoveNotificationType(p,a) (p)->lpVtbl->RemoveNotificationType(p,a) +#define IDirectMusicTrack_Clone(p,a,b,c) (p)->lpVtbl->Clone(p,a,b,c) +#endif + + +/***************************************************************************** + * IDirectMusicTrack8 interface + */ +#define INTERFACE IDirectMusicTrack8 +DECLARE_INTERFACE_(IDirectMusicTrack8,IDirectMusicTrack) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicTrack methods ***/ + STDMETHOD(Init)(THIS_ struct IDirectMusicSegment *pSegment) PURE; + STDMETHOD(InitPlay)(THIS_ struct IDirectMusicSegmentState *pSegmentState, struct IDirectMusicPerformance *pPerformance, void **ppStateData, DWORD dwVirtualTrackID, DWORD dwFlags) PURE; + STDMETHOD(EndPlay)(THIS_ void *pStateData) PURE; + STDMETHOD(Play)(THIS_ void *pStateData, MUSIC_TIME mtStart, MUSIC_TIME mtEnd, MUSIC_TIME mtOffset, DWORD dwFlags, struct IDirectMusicPerformance *pPerf, struct IDirectMusicSegmentState *pSegSt, DWORD dwVirtualID) PURE; + STDMETHOD(GetParam)(THIS_ REFGUID rguidType, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) PURE; + STDMETHOD(SetParam)(THIS_ REFGUID rguidType, MUSIC_TIME mtTime, void *pParam) PURE; + STDMETHOD(IsParamSupported)(THIS_ REFGUID rguidType) PURE; + STDMETHOD(AddNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(RemoveNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(Clone)(THIS_ MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicTrack **ppTrack) PURE; + /*** IDirectMusicTrack8 methods ***/ + STDMETHOD(PlayEx)(THIS_ void *pStateData, REFERENCE_TIME rtStart, REFERENCE_TIME rtEnd, REFERENCE_TIME rtOffset, DWORD dwFlags, struct IDirectMusicPerformance *pPerf, struct IDirectMusicSegmentState *pSegSt, DWORD dwVirtualID) PURE; + STDMETHOD(GetParamEx)(THIS_ REFGUID rguidType, REFERENCE_TIME rtTime, REFERENCE_TIME *prtNext, void *pParam, void *pStateData, DWORD dwFlags) PURE; + STDMETHOD(SetParamEx)(THIS_ REFGUID rguidType, REFERENCE_TIME rtTime, void *pParam, void *pStateData, DWORD dwFlags) PURE; + STDMETHOD(Compose)(THIS_ IUnknown *pContext, DWORD dwTrackGroup, IDirectMusicTrack **ppResultTrack) PURE; + STDMETHOD(Join)(THIS_ IDirectMusicTrack *pNewTrack, MUSIC_TIME mtJoin, IUnknown *pContext, DWORD dwTrackGroup, IDirectMusicTrack **ppResultTrack) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicTrack8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicTrack8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicTrack8_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicTrack methods ***/ +#define IDirectMusicTrack8_Init(p,a) (p)->lpVtbl->Init(p,a) +#define IDirectMusicTrack8_InitPlay(p,a,b,c,d,e) (p)->lpVtbl->InitPlay(p,a,b,c,d,e) +#define IDirectMusicTrack8_EndPlay(p,a) (p)->lpVtbl->EndPlay(p,a) +#define IDirectMusicTrack8_Play(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->Play(p,a,b,c,d,e,f,g,h) +#define IDirectMusicTrack8_GetParam(p,a,b,c,d) (p)->lpVtbl->GetParam(p,a,b,c,d) +#define IDirectMusicTrack8_SetParam(p,a,b,c) (p)->lpVtbl->SetParam(p,a,b,c) +#define IDirectMusicTrack8_IsParamSupported(p,a) (p)->lpVtbl->IsParamSupported(p,a) +#define IDirectMusicTrack8_AddNotificationType(p,a) (p)->lpVtbl->AddNotificationType(p,a) +#define IDirectMusicTrack8_RemoveNotificationType(p,a) (p)->lpVtbl->RemoveNotificationType(p,a) +#define IDirectMusicTrack8_Clone(p,a,b,c) (p)->lpVtbl->Clone(p,a,b,c) +/*** IDirectMusicTrack8 methods ***/ +#define IDirectMusicTrack8_PlayEx(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->PlayEx(p,a,b,c,d,e,f,g,h) +#define IDirectMusicTrack8_GetParamEx(p,a,b,c,d,e,f) (p)->lpVtbl->GetParamEx(p,a,b,c,d,e,f) +#define IDirectMusicTrack8_SetParamEx(p,a,b,c,d,e) (p)->lpVtbl->SetParamEx(p,a,b,c,d,e) +#define IDirectMusicTrack8_Compose(p,a,b,c) (p)->lpVtbl->Compose(p,a,b,c) +#define IDirectMusicTrack8_Join(p,a,b,c,d,e) (p)->lpVtbl->Join(p,a,b,c,d,e) +#endif + +#ifdef __cplusplus +} +#endif + +#include + +#endif /* __WINE_DMUSIC_PLUGIN_H */ diff --git a/reactos/include/dxsdk/dmusicc.h b/reactos/include/dxsdk/dmusicc.h new file mode 100644 index 00000000000..7aac00b177d --- /dev/null +++ b/reactos/include/dxsdk/dmusicc.h @@ -0,0 +1,768 @@ +/* DirectMusic Core API Stuff + * + * Copyright (C) 2003-2004 Rok Mandeljc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_DMUSIC_CORE_H +#define __WINE_DMUSIC_CORE_H + +#ifndef __WINESRC__ +#include +#endif /* __WINESRC__ */ + +#define COM_NO_WINDOWS_H +#include +#include + +#include +#include +#include +#include +#include + +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +/***************************************************************************** + * Predeclare the interfaces + */ +/* CLSIDs */ +DEFINE_GUID(CLSID_DirectMusic, 0x636b9f10,0x0c7d,0x11d1,0x95,0xb2,0x00,0x20,0xaf,0xdc,0x74,0x21); +DEFINE_GUID(CLSID_DirectMusicCollection, 0x480ff4b0,0x28b2,0x11d1,0xbe,0xf7,0x00,0xc0,0x4f,0xbf,0x8f,0xef); +DEFINE_GUID(CLSID_DirectMusicSynth, 0x58c2b4d0,0x46e7,0x11d1,0x89,0xac,0x00,0xa0,0xc9,0x05,0x41,0x29); + +/* IIDs */ +DEFINE_GUID(IID_IDirectMusic, 0x6536115a,0x7b2d,0x11d2,0xba,0x18,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(IID_IDirectMusic2, 0x6fc2cae1,0xbc78,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6); +DEFINE_GUID(IID_IDirectMusic8, 0x2d3629f7,0x813d,0x4939,0x85,0x08,0xf0,0x5c,0x6b,0x75,0xfd,0x97); +DEFINE_GUID(IID_IDirectMusicBuffer, 0xd2ac2878,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicCollection, 0xd2ac287c,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicDownload, 0xd2ac287b,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicDownloadedInstrument, 0xd2ac287e,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicInstrument, 0xd2ac287d,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicPort, 0x08f2d8c9,0x37c2,0x11d2,0xb9,0xf9,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(IID_IDirectMusicPortDownload, 0xd2ac287a,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicThru, 0xced153e7,0x3606,0x11d2,0xb9,0xf9,0x00,0x00,0xf8,0x75,0xac,0x12); + +#define IID_IDirectMusicCollection8 IID_IDirectMusicCollection +#define IID_IDirectMusicDownload8 IID_IDirectMusicDownload +#define IID_IDirectMusicDownloadedInstrument8 IID_IDirectMusicDownloadedInstrument +#define IID_IDirectMusicInstrument8 IID_IDirectMusicInstrument +#define IID_IDirectMusicPort8 IID_IDirectMusicPort +#define IID_IDirectMusicPortDownload8 IID_IDirectMusicPortDownload +#define IID_IDirectMusicThru8 IID_IDirectMusicThru + +/* GUIDs - property set */ +DEFINE_GUID(GUID_DMUS_PROP_GM_Hardware, 0x178f2f24,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(GUID_DMUS_PROP_GS_Capable, 0x6496aba2,0x61b0,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6); +DEFINE_GUID(GUID_DMUS_PROP_GS_Hardware, 0x178f2f25,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(GUID_DMUS_PROP_DLS1, 0x178f2f27,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(GUID_DMUS_PROP_DLS2, 0xf14599e5,0x4689,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6); +DEFINE_GUID(GUID_DMUS_PROP_Effects, 0xcda8d611,0x684a,0x11d2,0x87,0x1e,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_DMUS_PROP_INSTRUMENT2, 0x865fd372,0x9f67,0x11d2,0x87,0x2a,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_DMUS_PROP_LegacyCaps, 0xcfa7cdc2,0x00a1,0x11d2,0xaa,0xd5,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(GUID_DMUS_PROP_MemorySize, 0x178f2f28,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(GUID_DMUS_PROP_SampleMemorySize, 0x178f2f28,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(GUID_DMUS_PROP_SamplePlaybackRate, 0x2a91f713,0xa4bf,0x11d2,0xbb,0xdf,0x00,0x60,0x08,0x33,0xdb,0xd8); +DEFINE_GUID(GUID_DMUS_PROP_SynthSink_DSOUND, 0x0aa97844,0xc877,0x11d1,0x87,0x0c,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_DMUS_PROP_SynthSink_WAVE, 0x0aa97845,0xc877,0x11d1,0x87,0x0c,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_DMUS_PROP_Volume, 0xfedfae25,0xe46e,0x11d1,0xaa,0xce,0x00,0x00,0xf8,0x75,0xac,0x12); +DEFINE_GUID(GUID_DMUS_PROP_WavesReverb, 0x04cb5622,0x32e5,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6); +DEFINE_GUID(GUID_DMUS_PROP_WriteLatency, 0x268a0fa0,0x60f2,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6); +DEFINE_GUID(GUID_DMUS_PROP_WritePeriod, 0x268a0fa1,0x60f2,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6); +DEFINE_GUID(GUID_DMUS_PROP_XG_Capable, 0x6496aba1,0x61b0,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6); +DEFINE_GUID(GUID_DMUS_PROP_XG_Hardware, 0x178f2f26,0xc364,0x11d1,0xa7,0x60,0x00,0x00,0xf8,0x75,0xac,0x12); + +/* typedef definitions */ +typedef struct IDirectMusic *LPDIRECTMUSIC; +typedef struct IDirectMusic8 *LPDIRECTMUSIC8; +typedef struct IDirectMusicBuffer *LPDIRECTMUSICBUFFER; +typedef struct IDirectMusicBuffer IDirectMusicBuffer8, *LPDIRECTMUSICBUFFER8; +typedef struct IDirectMusicInstrument *LPDIRECTMUSICINSTRUMENT; +typedef struct IDirectMusicInstrument IDirectMusicInstrument8, *LPDIRECTMUSICINSTRUMENT8; +typedef struct IDirectMusicDownloadedInstrument *LPDIRECTMUSICDOWNLOADEDINSTRUMENT; +typedef struct IDirectMusicDownloadedInstrument IDirectMusicDownloadedInstrument8, *LPDIRECTMUSICDOWNLOADEDINSTRUMENT8; +typedef struct IDirectMusicCollection *LPDIRECTMUSICCOLLECTION; +typedef struct IDirectMusicCollection IDirectMusicCollection8, *LPDIRECTMUSICCOLLECTION8; +typedef struct IDirectMusicDownload *LPDIRECTMUSICDOWNLOAD; +typedef struct IDirectMusicDownload IDirectMusicDownload8, *LPDIRECTMUSICDOWNLOAD8; +typedef struct IDirectMusicPortDownload *LPDIRECTMUSICPORTDOWNLOAD; +typedef struct IDirectMusicPortDownload IDirectMusicPortDownload8, *LPDIRECTMUSICPORTDOWNLOAD8; +typedef struct IDirectMusicPort *LPDIRECTMUSICPORT; +typedef struct IDirectMusicPort IDirectMusicPort8, *LPDIRECTMUSICPORT8; +typedef struct IDirectMusicThru *LPDIRECTMUSICTHRU; +typedef struct IDirectMusicThru IDirectMusicThru8, *LPDIRECTMUSICTHRU8; +typedef struct IReferenceClock *LPREFERENCECLOCK; + + +/***************************************************************************** + * Typedef definitions + */ +typedef ULONGLONG SAMPLE_TIME, *LPSAMPLE_TIME; +typedef ULONGLONG SAMPLE_POSITION, *LPSAMPLE_POSITION; + + +/***************************************************************************** + * Flags + */ +#ifndef _DIRECTAUDIO_PRIORITIES_DEFINED_ +#define _DIRECTAUDIO_PRIORITIES_DEFINED_ + +#define DAUD_CRITICAL_VOICE_PRIORITY 0xF0000000 +#define DAUD_HIGH_VOICE_PRIORITY 0xC0000000 +#define DAUD_STANDARD_VOICE_PRIORITY 0x80000000 +#define DAUD_LOW_VOICE_PRIORITY 0x40000000 +#define DAUD_PERSIST_VOICE_PRIORITY 0x10000000 + +#define DAUD_CHAN1_VOICE_PRIORITY_OFFSET 0x0000000E +#define DAUD_CHAN2_VOICE_PRIORITY_OFFSET 0x0000000D +#define DAUD_CHAN3_VOICE_PRIORITY_OFFSET 0x0000000C +#define DAUD_CHAN4_VOICE_PRIORITY_OFFSET 0x0000000B +#define DAUD_CHAN5_VOICE_PRIORITY_OFFSET 0x0000000A +#define DAUD_CHAN6_VOICE_PRIORITY_OFFSET 0x00000009 +#define DAUD_CHAN7_VOICE_PRIORITY_OFFSET 0x00000008 +#define DAUD_CHAN8_VOICE_PRIORITY_OFFSET 0x00000007 +#define DAUD_CHAN9_VOICE_PRIORITY_OFFSET 0x00000006 +#define DAUD_CHAN10_VOICE_PRIORITY_OFFSET 0x0000000F +#define DAUD_CHAN11_VOICE_PRIORITY_OFFSET 0x00000005 +#define DAUD_CHAN12_VOICE_PRIORITY_OFFSET 0x00000004 +#define DAUD_CHAN13_VOICE_PRIORITY_OFFSET 0x00000003 +#define DAUD_CHAN14_VOICE_PRIORITY_OFFSET 0x00000002 +#define DAUD_CHAN15_VOICE_PRIORITY_OFFSET 0x00000001 +#define DAUD_CHAN16_VOICE_PRIORITY_OFFSET 0x00000000 + +#define DAUD_CHAN1_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN1_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN2_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN2_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN3_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN3_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN4_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN4_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN5_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN5_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN6_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN6_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN7_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN7_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN8_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN8_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN9_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN9_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN10_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN10_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN11_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN11_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN12_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN12_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN13_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN13_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN14_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN14_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN15_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN15_VOICE_PRIORITY_OFFSET) +#define DAUD_CHAN16_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN16_VOICE_PRIORITY_OFFSET) +#endif /* _DIRECTAUDIO_PRIORITIES_DEFINED_ */ + +#define DMUS_CLOCKF_GLOBAL 0x1 + +#define DMUS_EFFECT_NONE 0x0 +#define DMUS_EFFECT_REVERB 0x1 +#define DMUS_EFFECT_CHORUS 0x2 +#define DMUS_EFFECT_DELAY 0x4 + +#define DMUS_MAX_DESCRIPTION 0x80 +#define DMUS_MAX_DRIVER 0x80 + +#define DMUS_PC_INPUTCLASS 0x0 +#define DMUS_PC_OUTPUTCLASS 0x1 + +#define DMUS_PC_DLS 0x00000001 +#define DMUS_PC_EXTERNAL 0x00000002 +#define DMUS_PC_SOFTWARESYNTH 0x00000004 +#define DMUS_PC_MEMORYSIZEFIXED 0x00000008 +#define DMUS_PC_GMINHARDWARE 0x00000010 +#define DMUS_PC_GSINHARDWARE 0x00000020 +#define DMUS_PC_XGINHARDWARE 0x00000040 +#define DMUS_PC_DIRECTSOUND 0x00000080 +#define DMUS_PC_SHAREABLE 0x00000100 +#define DMUS_PC_DLS2 0x00000200 +#define DMUS_PC_AUDIOPATH 0x00000400 +#define DMUS_PC_WAVE 0x00000800 +#define DMUS_PC_SYSTEMMEMORY 0x7FFFFFFF + +#define DMUS_PORT_WINMM_DRIVER 0x0 +#define DMUS_PORT_USER_MODE_SYNTH 0x1 +#define DMUS_PORT_KERNEL_MODE 0x2 + +#define DMUS_PORT_FEATURE_AUDIOPATH 0x1 +#define DMUS_PORT_FEATURE_STREAMING 0x2 + +#define DMUS_PORTPARAMS_VOICES 0x01 +#define DMUS_PORTPARAMS_CHANNELGROUPS 0x02 +#define DMUS_PORTPARAMS_AUDIOCHANNELS 0x04 +#define DMUS_PORTPARAMS_SAMPLERATE 0x08 +#define DMUS_PORTPARAMS_EFFECTS 0x20 +#define DMUS_PORTPARAMS_SHARE 0x40 +#define DMUS_PORTPARAMS_FEATURES 0x80 + +#define DMUS_VOLUME_MAX 2000 +#define DMUS_VOLUME_MIN -20000 + +#define DMUS_SYNTHSTATS_VOICES 0x01 +#define DMUS_SYNTHSTATS_TOTAL_CPU 0x02 +#define DMUS_SYNTHSTATS_CPU_PER_VOICE 0x04 +#define DMUS_SYNTHSTATS_LOST_NOTES 0x08 +#define DMUS_SYNTHSTATS_PEAK_VOLUME 0x10 +#define DMUS_SYNTHSTATS_FREE_MEMORY 0x20 +#define DMUS_SYNTHSTATS_SYSTEMMEMORY DMUS_PC_SYSTEMMEMORY + +#define DSBUSID_FIRST_SPKR_LOC 0x00000000 +#define DSBUSID_FRONT_LEFT 0x00000000 +#define DSBUSID_LEFT 0x00000000 +#define DSBUSID_FRONT_RIGHT 0x00000001 +#define DSBUSID_RIGHT 0x00000001 +#define DSBUSID_FRONT_CENTER 0x00000002 +#define DSBUSID_LOW_FREQUENCY 0x00000003 +#define DSBUSID_BACK_LEFT 0x00000004 +#define DSBUSID_BACK_RIGHT 0x00000005 +#define DSBUSID_FRONT_LEFT_OF_CENTER 0x00000006 +#define DSBUSID_FRONT_RIGHT_OF_CENTER 0x00000007 +#define DSBUSID_BACK_CENTER 0x00000008 +#define DSBUSID_SIDE_LEFT 0x00000009 +#define DSBUSID_SIDE_RIGHT 0x0000000A +#define DSBUSID_TOP_CENTER 0x0000000B +#define DSBUSID_TOP_FRONT_LEFT 0x0000000C +#define DSBUSID_TOP_FRONT_CENTER 0x0000000D +#define DSBUSID_TOP_FRONT_RIGHT 0x0000000E +#define DSBUSID_TOP_BACK_LEFT 0x0000000F +#define DSBUSID_TOP_BACK_CENTER 0x00000010 +#define DSBUSID_TOP_BACK_RIGHT 0x011 +#define DSBUSID_LAST_SPKR_LOC 0x00000011 +#define DSBUSID_IS_SPKR_LOC(id) (((id) >= DSBUSID_FIRST_SPKR_LOC) && ((id) <= DSBUSID_LAST_SPKR_LOC)) + +#define DSBUSID_REVERB_SEND 0x00000040 +#define DSBUSID_CHORUS_SEND 0x00000041 + +#define DSBUSID_DYNAMIC_0 0x00000200 + +#define DSBUSID_NULL 0xFFFFFFFF + +/***************************************************************************** + * Enumerations + */ +typedef enum { + DMUS_CLOCK_SYSTEM = 0x0, + DMUS_CLOCK_WAVE = 0x1 +} DMUS_CLOCKTYPE; + + +/***************************************************************************** + * Structures + */ +/* typedef definitions */ +typedef struct _DMUS_BUFFERDESC DMUS_BUFFERDESC, *LPDMUS_BUFFERDESC; +typedef struct _DMUS_PORTCAPS DMUS_PORTCAPS, *LPDMUS_PORTCAPS; +typedef struct _DMUS_PORTPARAMS DMUS_PORTPARAMS7, *LPDMUS_PORTPARAMS7; +typedef struct _DMUS_PORTPARAMS8 DMUS_PORTPARAMS8, *LPDMUS_PORTPARAMS8; +typedef DMUS_PORTPARAMS8 DMUS_PORTPARAMS, *LPDMUS_PORTPARAMS; +typedef struct _DMUS_SYNTHSTATS DMUS_SYNTHSTATS, *LPDMUS_SYNTHSTATS; +typedef struct _DMUS_SYNTHSTATS8 DMUS_SYNTHSTATS8, *LPDMUS_SYNTHSTATS8; +typedef struct _DMUS_WAVES_REVERB_PARAMS DMUS_WAVES_REVERB_PARAMS, *LPDMUS_WAVES_REVERB_PARAMS; +typedef struct _DMUS_CLOCKINFO7 DMUS_CLOCKINFO7, *LPDMUS_CLOCKINFO7; +typedef struct _DMUS_CLOCKINFO8 DMUS_CLOCKINFO8, *LPDMUS_CLOCKINFO8; +typedef DMUS_CLOCKINFO8 DMUS_CLOCKINFO, *LPDMUS_CLOCKINFO; + + +/* actual structures */ +struct _DMUS_BUFFERDESC { + DWORD dwSize; + DWORD dwFlags; + GUID guidBufferFormat; + DWORD cbBuffer; +} ; + +struct _DMUS_PORTCAPS { + DWORD dwSize; + DWORD dwFlags; + GUID guidPort; + DWORD dwClass; + DWORD dwType; + DWORD dwMemorySize; + DWORD dwMaxChannelGroups; + DWORD dwMaxVoices; + DWORD dwMaxAudioChannels; + DWORD dwEffectFlags; + WCHAR wszDescription[DMUS_MAX_DESCRIPTION]; +}; + +struct _DMUS_PORTPARAMS { + DWORD dwSize; + DWORD dwValidParams; + DWORD dwVoices; + DWORD dwChannelGroups; + DWORD dwAudioChannels; + DWORD dwSampleRate; + DWORD dwEffectFlags; + BOOL fShare; +}; + +struct _DMUS_PORTPARAMS8 { + DWORD dwSize; + DWORD dwValidParams; + DWORD dwVoices; + DWORD dwChannelGroups; + DWORD dwAudioChannels; + DWORD dwSampleRate; + DWORD dwEffectFlags; + BOOL fShare; + DWORD dwFeatures; +}; + +struct _DMUS_SYNTHSTATS { + DWORD dwSize; + DWORD dwValidStats; + DWORD dwVoices; + DWORD dwTotalCPU; + DWORD dwCPUPerVoice; + DWORD dwLostNotes; + DWORD dwFreeMemory; + LONG lPeakVolume; +}; + +struct _DMUS_SYNTHSTATS8 { + DWORD dwSize; + DWORD dwValidStats; + DWORD dwVoices; + DWORD dwTotalCPU; + DWORD dwCPUPerVoice; + DWORD dwLostNotes; + DWORD dwFreeMemory; + LONG lPeakVolume; + DWORD dwSynthMemUse; +}; + +struct _DMUS_WAVES_REVERB_PARAMS { + float fInGain; + float fReverbMix; + float fReverbTime; + float fHighFreqRTRatio; +}; + +struct _DMUS_CLOCKINFO7 { + DWORD dwSize; + DMUS_CLOCKTYPE ctType; + GUID guidClock; + WCHAR wszDescription[DMUS_MAX_DESCRIPTION]; +}; + +struct _DMUS_CLOCKINFO8 { + DWORD dwSize; + DMUS_CLOCKTYPE ctType; + GUID guidClock; + WCHAR wszDescription[DMUS_MAX_DESCRIPTION]; + DWORD dwFlags; +}; + + +/***************************************************************************** + * IDirectMusic interface + */ +#define INTERFACE IDirectMusic +DECLARE_INTERFACE_(IDirectMusic,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusic methods ***/ + STDMETHOD(EnumPort)(THIS_ DWORD dwIndex, LPDMUS_PORTCAPS pPortCaps) PURE; + STDMETHOD(CreateMusicBuffer)(THIS_ LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER **ppBuffer, LPUNKNOWN pUnkOuter) PURE; + STDMETHOD(CreatePort)(THIS_ REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT *ppPort, LPUNKNOWN pUnkOuter) PURE; + STDMETHOD(EnumMasterClock)(THIS_ DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo) PURE; + STDMETHOD(GetMasterClock)(THIS_ LPGUID pguidClock, struct IReferenceClock **ppReferenceClock) PURE; + STDMETHOD(SetMasterClock)(THIS_ REFGUID rguidClock) PURE; + STDMETHOD(Activate)(THIS_ BOOL fEnable) PURE; + STDMETHOD(GetDefaultPort)(THIS_ LPGUID pguidPort) PURE; + STDMETHOD(SetDirectSound)(THIS_ LPDIRECTSOUND pDirectSound, HWND hWnd) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusic_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusic_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusic_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusic methods ***/ +#define IDirectMusic_EnumPort(p,a,b) (p)->lpVtbl->EnumPort(p,a,b) +#define IDirectMusic_CreateMusicBuffer(p,a,b,c) (p)->lpVtbl->CreateMusicBuffer(p,a,b,c) +#define IDirectMusic_CreatePort(p,a,b,c,d) (p)->lpVtbl->CreatePort(p,a,b,c,d) +#define IDirectMusic_EnumMasterClock(p,a,b) (p)->lpVtbl->EnumMasterClock(p,a,b) +#define IDirectMusic_GetMasterClock(p,a,b) (p)->lpVtbl->GetMasterClock(p,a,b) +#define IDirectMusic_SetMasterClock(p,a) (p)->lpVtbl->SetMasterClock(p,a) +#define IDirectMusic_Activate(p,a) (p)->lpVtbl->Activate(p,a) +#define IDirectMusic_GetDefaultPort(p,a) (p)->lpVtbl->GetDefaultPort(p,a) +#define IDirectMusic_SetDirectSound(p,a,b) (p)->lpVtbl->SetDirectSound(p,a,b) +#endif + + +/***************************************************************************** + * IDirectMusic8 interface + */ +#define INTERFACE IDirectMusic8 +DECLARE_INTERFACE_(IDirectMusic8,IDirectMusic) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusic methods ***/ + STDMETHOD(EnumPort)(THIS_ DWORD dwIndex, LPDMUS_PORTCAPS pPortCaps) PURE; + STDMETHOD(CreateMusicBuffer)(THIS_ LPDMUS_BUFFERDESC pBufferDesc, LPDIRECTMUSICBUFFER **ppBuffer, LPUNKNOWN pUnkOuter) PURE; + STDMETHOD(CreatePort)(THIS_ REFCLSID rclsidPort, LPDMUS_PORTPARAMS pPortParams, LPDIRECTMUSICPORT *ppPort, LPUNKNOWN pUnkOuter) PURE; + STDMETHOD(EnumMasterClock)(THIS_ DWORD dwIndex, LPDMUS_CLOCKINFO lpClockInfo) PURE; + STDMETHOD(GetMasterClock)(THIS_ LPGUID pguidClock, struct IReferenceClock **ppReferenceClock) PURE; + STDMETHOD(SetMasterClock)(THIS_ REFGUID rguidClock) PURE; + STDMETHOD(Activate)(THIS_ BOOL fEnable) PURE; + STDMETHOD(GetDefaultPort)(THIS_ LPGUID pguidPort) PURE; + STDMETHOD(SetDirectSound)(THIS_ LPDIRECTSOUND pDirectSound, HWND hWnd) PURE; + /*** IDirectMusic8 methods ***/ + STDMETHOD(SetExternalMasterClock)(THIS_ struct IReferenceClock *pClock) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusic8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusic8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusic8_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusic methods ***/ +#define IDirectMusic8_EnumPort(p,a,b) (p)->lpVtbl->EnumPort(p,a,b) +#define IDirectMusic8_CreateMusicBuffer(p,a,b,c) (p)->lpVtbl->CreateMusicBuffer(p,a,b,c) +#define IDirectMusic8_CreatePort(p,a,b,c,d) (p)->lpVtbl->CreatePort(p,a,b,c,d) +#define IDirectMusic8_EnumMasterClock(p,a,b) (p)->lpVtbl->EnumMasterClock(p,a,b) +#define IDirectMusic8_GetMasterClock(p,a,b) (p)->lpVtbl->GetMasterClock(p,a,b) +#define IDirectMusic8_SetMasterClock(p,a) (p)->lpVtbl->SetMasterClock(p,a) +#define IDirectMusic8_Activate(p,a) (p)->lpVtbl->Activate(p,a) +#define IDirectMusic8_GetDefaultPort(p,a) (p)->lpVtbl->GetDefaultPort(p,a) +#define IDirectMusic8_SetDirectSound(p,a,b) (p)->lpVtbl->SetDirectSound(p,a,b) +/*** IDirectMusic8 methods ***/ +#define IDirectMusic8_SetExternalMasterClock(p,a) (p)->lpVtbl->SetExternalMasterClock(p,a) +#endif + + +/***************************************************************************** + * IDirectMusicBuffer interface + */ +#define INTERFACE IDirectMusicBuffer +DECLARE_INTERFACE_(IDirectMusicBuffer,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicBuffer methods ***/ + STDMETHOD(Flush)(THIS) PURE; + STDMETHOD(TotalTime)(THIS_ LPREFERENCE_TIME prtTime) PURE; + STDMETHOD(PackStructured)(THIS_ REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD dwChannelMessage) PURE; + STDMETHOD(PackUnstructured)(THIS_ REFERENCE_TIME rt, DWORD dwChannelGroup, DWORD cb, LPBYTE lpb) PURE; + STDMETHOD(ResetReadPtr)(THIS) PURE; + STDMETHOD(GetNextEvent)(THIS_ LPREFERENCE_TIME prt, LPDWORD pdwChannelGroup, LPDWORD pdwLength, LPBYTE *ppData) PURE; + STDMETHOD(GetRawBufferPtr)(THIS_ LPBYTE *ppData) PURE; + STDMETHOD(GetStartTime)(THIS_ LPREFERENCE_TIME prt) PURE; + STDMETHOD(GetUsedBytes)(THIS_ LPDWORD pcb) PURE; + STDMETHOD(GetMaxBytes)(THIS_ LPDWORD pcb) PURE; + STDMETHOD(GetBufferFormat)(THIS_ LPGUID pGuidFormat) PURE; + STDMETHOD(SetStartTime)(THIS_ REFERENCE_TIME rt) PURE; + STDMETHOD(SetUsedBytes)(THIS_ DWORD cb) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicBuffer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicBuffer_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicBuffer_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicBuffer methods ***/ +#define IDirectMusicBuffer_Flush(p) (p)->lpVtbl->Flush(p) +#define IDirectMusicBuffer_TotalTime(p,a) (p)->lpVtbl->TotalTime(p,a) +#define IDirectMusicBuffer_PackStructured(p,a,b,c) (p)->lpVtbl->PackStructured(p,a,b,c) +#define IDirectMusicBuffer_PackUnstructured(p,a,b,c,d) (p)->lpVtbl->PackUnstructured(p,a,b,c,d) +#define IDirectMusicBuffer_ResetReadPtr(p) (p)->lpVtbl->ResetReadPtr(p) +#define IDirectMusicBuffer_GetNextEvent(p,a,b,c,d) (p)->lpVtbl->GetNextEvent(p,a,b,c,d) +#define IDirectMusicBuffer_GetRawBufferPtr(p,a) (p)->lpVtbl->GetRawBufferPtr(p,a) +#define IDirectMusicBuffer_GetStartTime(p,a) (p)->lpVtbl->GetStartTime(p,a) +#define IDirectMusicBuffer_GetUsedBytes(p,a) (p)->lpVtbl->GetUsedBytes(p,a) +#define IDirectMusicBuffer_GetMaxBytes(p,a) (p)->lpVtbl->GetMaxBytes(p,a) +#define IDirectMusicBuffer_GetBufferFormat(p,a) (p)->lpVtbl->GetBufferFormat(p,a) +#define IDirectMusicBuffer_SetStartTime(p,a) (p)->lpVtbl->SetStartTime(p,a) +#define IDirectMusicBuffer_SetUsedBytes(p,a) (p)->lpVtbl->SetUsedBytes(p,a) +#endif + + +/***************************************************************************** + * IDirectMusicInstrument interface + */ +#define INTERFACE IDirectMusicInstrument +DECLARE_INTERFACE_(IDirectMusicInstrument,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicInstrument methods ***/ + STDMETHOD(GetPatch)(THIS_ DWORD *pdwPatch) PURE; + STDMETHOD(SetPatch)(THIS_ DWORD dwPatch) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicInstrument_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicInstrument_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicInstrument_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicInstrument methods ***/ +#define IDirectMusicInstrument_GetPatch(p,a) (p)->lpVtbl->GetPatch(p,a) +#define IDirectMusicInstrument_SetPatch(p,a) (p)->lpVtbl->SetPatch(p,a) +#endif + + +/***************************************************************************** + * IDirectMusicDownloadedInstrument interface + */ +#define INTERFACE IDirectMusicDownloadedInstrument +DECLARE_INTERFACE_(IDirectMusicDownloadedInstrument,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /* no IDirectMusicDownloadedInstrument methods at this time */ +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicDownloadedInstrument_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicDownloadedInstrument_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicDownloadedInstrument_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicDownloadedInstrument methods ***/ +/* none at this time */ +#endif + + +/***************************************************************************** + * IDirectMusicCollection interface + */ +#define INTERFACE IDirectMusicCollection +DECLARE_INTERFACE_(IDirectMusicCollection,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicCollection methods ***/ + STDMETHOD(GetInstrument)(THIS_ DWORD dwPatch, IDirectMusicInstrument **ppInstrument) PURE; + STDMETHOD(EnumInstrument)(THIS_ DWORD dwIndex, DWORD *pdwPatch, LPWSTR pwszName, DWORD dwNameLen) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicCollection_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicCollection_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicCollection_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicCollection methods ***/ +#define IDirectMusicCollection_GetInstrument(p,a,b) (p)->lpVtbl->GetInstrument(p,a,b) +#define IDirectMusicCollection_EnumInstrument(p,a,b,c,d) (p)->lpVtbl->EnumInstrument(p,a,b,c,d) +#endif + + +/***************************************************************************** + * IDirectMusicDownload interface + */ +#define INTERFACE IDirectMusicDownload +DECLARE_INTERFACE_(IDirectMusicDownload,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicDownload methods ***/ + STDMETHOD(GetBuffer)(THIS_ void **ppvBuffer, DWORD *pdwSize) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicDownload_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicDownload_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicDownload_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicDownload methods ***/ +#define IDirectMusicDownload_GetBuffer(p,a,b) (p)->lpVtbl->GetBuffer(p,a,b) +#endif + + +/***************************************************************************** + * IDirectMusicPortDownload interface + */ +#define INTERFACE IDirectMusicPortDownload +DECLARE_INTERFACE_(IDirectMusicPortDownload,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicPortDownload methods ***/ + STDMETHOD(GetBuffer)(THIS_ DWORD dwDLId, IDirectMusicDownload **ppIDMDownload) PURE; + STDMETHOD(AllocateBuffer)(THIS_ DWORD dwSize, IDirectMusicDownload **ppIDMDownload) PURE; + STDMETHOD(GetDLId)(THIS_ DWORD *pdwStartDLId, DWORD dwCount) PURE; + STDMETHOD(GetAppend)(THIS_ DWORD *pdwAppend) PURE; + STDMETHOD(Download)(THIS_ IDirectMusicDownload *pIDMDownload) PURE; + STDMETHOD(Unload)(THIS_ IDirectMusicDownload *pIDMDownload) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicPortDownload_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicPortDownload_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicPortDownload_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicPortDownload methods ***/ +#define IDirectMusicPortDownload_GetBuffer(p,a,b) (p)->lpVtbl->GetBuffer(p,a,b) +#define IDirectMusicPortDownload_AllocateBuffer(p,a,b) (p)->lpVtbl->AllocateBuffer(p,a,b) +#define IDirectMusicPortDownload_GetDLId(p,a,b) (p)->lpVtbl->GetDLId(p,a,b) +#define IDirectMusicPortDownload_GetAppend(p,a) (p)->lpVtbl->GetAppend(p,a) +#define IDirectMusicPortDownload_Download(p,a) (p)->lpVtbl->Download(p,a) +#define IDirectMusicPortDownload_Unload(p,a) (p)->lpVtbl->GetBuffer(p,a) +#endif + + +/***************************************************************************** + * IDirectMusicPort interface + */ +#define INTERFACE IDirectMusicPort +DECLARE_INTERFACE_(IDirectMusicPort,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicPort methods ***/ + STDMETHOD(PlayBuffer)(THIS_ LPDIRECTMUSICBUFFER pBuffer) PURE; + STDMETHOD(SetReadNotificationHandle)(THIS_ HANDLE hEvent) PURE; + STDMETHOD(Read)(THIS_ LPDIRECTMUSICBUFFER pBuffer) PURE; + STDMETHOD(DownloadInstrument)(THIS_ IDirectMusicInstrument *pInstrument, IDirectMusicDownloadedInstrument **ppDownloadedInstrument, DMUS_NOTERANGE *pNoteRanges, DWORD dwNumNoteRanges) PURE; + STDMETHOD(UnloadInstrument)(THIS_ IDirectMusicDownloadedInstrument *pDownloadedInstrument) PURE; + STDMETHOD(GetLatencyClock)(THIS_ struct IReferenceClock **ppClock) PURE; + STDMETHOD(GetRunningStats)(THIS_ LPDMUS_SYNTHSTATS pStats) PURE; + STDMETHOD(Compact)(THIS) PURE; + STDMETHOD(GetCaps)(THIS_ LPDMUS_PORTCAPS pPortCaps) PURE; + STDMETHOD(DeviceIoControl)(THIS_ DWORD dwIoControlCode, LPVOID lpInBuffer, DWORD nInBufferSize, LPVOID lpOutBuffer, DWORD nOutBufferSize, LPDWORD lpBytesReturned, LPOVERLAPPED lpOverlapped) PURE; + STDMETHOD(SetNumChannelGroups)(THIS_ DWORD dwChannelGroups) PURE; + STDMETHOD(GetNumChannelGroups)(THIS_ LPDWORD pdwChannelGroups) PURE; + STDMETHOD(Activate)(THIS_ BOOL fActive) PURE; + STDMETHOD(SetChannelPriority)(THIS_ DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority) PURE; + STDMETHOD(GetChannelPriority)(THIS_ DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority) PURE; + STDMETHOD(SetDirectSound)(THIS_ LPDIRECTSOUND pDirectSound, LPDIRECTSOUNDBUFFER pDirectSoundBuffer) PURE; + STDMETHOD(GetFormat)(THIS_ LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize, LPDWORD pdwBufferSize) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicPort_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicPort_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicPort_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicPort methods ***/ +#define IDirectMusicPort_PlayBuffer(p,a) (p)->lpVtbl->PlayBuffer(p,a) +#define IDirectMusicPort_SetReadNotificationHandle(p,a) (p)->lpVtbl->SetReadNotificationHandle(p,a) +#define IDirectMusicPort_Read(p,a) (p)->lpVtbl->Read(p,a) +#define IDirectMusicPort_DownloadInstrument(p,a,b,c,d) (p)->lpVtbl->DownloadInstrument(p,a,b,c,d) +#define IDirectMusicPort_UnloadInstrument(p,a) (p)->lpVtbl->UnloadInstrument(p,a) +#define IDirectMusicPort_GetLatencyClock(p,a) (p)->lpVtbl->GetLatencyClock(p,a) +#define IDirectMusicPort_GetRunningStats(p,a) (p)->lpVtbl->GetRunningStats(p,a) +#define IDirectMusicPort_Compact(p) (p)->lpVtbl->Compact(p) +#define IDirectMusicPort_GetCaps(p,a) (p)->lpVtbl->GetCaps(p,a) +#define IDirectMusicPort_DeviceIoControl(p,a,b,c,d,e,f,g) (p)->lpVtbl->DeviceIoControl(p,a,b,c,d,e,f,g) +#define IDirectMusicPort_SetNumChannelGroups(p,a) (p)->lpVtbl->SetNumChannelGroups(p,a) +#define IDirectMusicPort_GetNumChannelGroups(p,a) (p)->lpVtbl->GetNumChannelGroups(p,a) +#define IDirectMusicPort_Activate(p,a) (p)->lpVtbl->Activate(p,a) +#define IDirectMusicPort_SetChannelPriority(p,a,b,c) (p)->lpVtbl->SetChannelPriority(p,a,b,c) +#define IDirectMusicPort_GetChannelPriority(p,a,b,c) (p)->lpVtbl->GetChannelPriority(p,a,b,c) +#define IDirectMusicPort_SetDirectSound(p,a,b) (p)->lpVtbl->SetDirectSound(p,a,b) +#define IDirectMusicPort_GetFormat(p,a,b,c) (p)->lpVtbl->GetFormat(p,a,b,c) +#endif + + +/***************************************************************************** + * IDirectMusicThru interface + */ +#define INTERFACE IDirectMusicThru +DECLARE_INTERFACE_(IDirectMusicThru,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicThru methods ***/ + STDMETHOD(ThruChannel)(THIS_ DWORD dwSourceChannelGroup, DWORD dwSourceChannel, DWORD dwDestinationChannelGroup, DWORD dwDestinationChannel, LPDIRECTMUSICPORT pDestinationPort) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicThru_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicThru_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicThru_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicThru methods ***/ +#define IDirectMusicThru_ThruChannel(p,a,b,c,d,e) (p)->lpVtbl->ThruChannel(p,a,b,c,d,e) +#endif + + +#ifndef __IReferenceClock_INTERFACE_DEFINED__ +#define __IReferenceClock_INTERFACE_DEFINED__ +DEFINE_GUID(IID_IReferenceClock,0x56a86897,0x0ad4,0x11ce,0xb0,0x3a,0x00,0x20,0xaf,0x0b,0xa7,0x70); + +/***************************************************************************** + * IReferenceClock interface + */ +#define INTERFACE IReferenceClock +DECLARE_INTERFACE_(IReferenceClock,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IReferenceClock methods ***/ + STDMETHOD(GetTime)(THIS_ REFERENCE_TIME *pTime) PURE; + STDMETHOD(AdviseTime)(THIS_ REFERENCE_TIME baseTime, REFERENCE_TIME streamTime, HANDLE hEvent, DWORD *pdwAdviseCookie) PURE; + STDMETHOD(AdvisePeriodic)(THIS_ REFERENCE_TIME startTime, REFERENCE_TIME periodTime, HANDLE hSemaphore, DWORD *pdwAdviseCookie) PURE; + STDMETHOD(Unadvise)(THIS_ DWORD dwAdviseCookie) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IReferenceClock_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IReferenceClock_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IReferenceClock_Release(p) (p)->lpVtbl->Release(p) +/*** IReferenceClock methods ***/ +#define IReferenceClock_GetTime(p,a) (p)->lpVtbl->GetTime(p,a) +#define IReferenceClock_AdviseTime(p,a,b,c,d) (p)->lpVtbl->AdviseTime(p,a,b,c,d) +#define IReferenceClock_AdvisePeriodic(p,a,b,c,d) (p)->lpVtbl->AdvisePeriodic(p,a,b,c,d) +#define IReferenceClock_Unadvise(p,a) (p)->lpVtbl->Unadvise(p,a) +#endif + +#endif /* __IReferenceClock_INTERFACE_DEFINED__ */ + +#ifdef __cplusplus +} +#endif + +#include + +#endif /* __WINE_DMUSIC_CORE_H */ diff --git a/reactos/include/dxsdk/dmusicf.h b/reactos/include/dxsdk/dmusicf.h new file mode 100644 index 00000000000..6906ecc2675 --- /dev/null +++ b/reactos/include/dxsdk/dmusicf.h @@ -0,0 +1,911 @@ +/* + * DirectMusic File Formats + * + * Copyright (C) 2003-2004 Rok Mandeljc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_DMUSIC_FILEFORMATS_H +#define __WINE_DMUSIC_FILEFORMATS_H + +#ifndef __WINESRC__ +#include +#endif /* __WINESRC__ */ + +#define COM_NO_WINDOWS_H +#include +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +/***************************************************************************** + * FOURCC Definitions + */ +/* Common chunks */ +#define DMUS_FOURCC_GUID_CHUNK mmioFOURCC('g','u','i','d') +#define DMUS_FOURCC_INFO_LIST mmioFOURCC('I','N','F','O') +#define DMUS_FOURCC_UNFO_LIST mmioFOURCC('U','N','F','O') +#define DMUS_FOURCC_UNAM_CHUNK mmioFOURCC('U','N','A','M') +#define DMUS_FOURCC_UART_CHUNK mmioFOURCC('U','A','R','T') +#define DMUS_FOURCC_UCOP_CHUNK mmioFOURCC('U','C','O','P') +#define DMUS_FOURCC_USBJ_CHUNK mmioFOURCC('U','S','B','J') +#define DMUS_FOURCC_UCMT_CHUNK mmioFOURCC('U','C','M','T') +#define DMUS_FOURCC_CATEGORY_CHUNK mmioFOURCC('c','a','t','g') +#define DMUS_FOURCC_VERSION_CHUNK mmioFOURCC('v','e','r','s') +/* AudioPath */ +#define DMUS_FOURCC_AUDIOPATH_FORM mmioFOURCC('D','M','A','P') +#define DMUS_FOURCC_PORTCONFIGS_LIST mmioFOURCC('p','c','s','l') +#define DMUS_FOURCC_PORTCONFIG_LIST mmioFOURCC('p','c','f','l') +#define DMUS_FOURCC_PORTCONFIG_ITEM mmioFOURCC('p','c','f','h') +#define DMUS_FOURCC_PORTPARAMS_ITEM mmioFOURCC('p','p','r','h') +#define DMUS_FOURCC_DSBUFFER_LIST mmioFOURCC('d','b','f','l') +#define DMUS_FOURCC_DSBUFFATTR_ITEM mmioFOURCC('d','d','a','h') +#define DMUS_FOURCC_PCHANNELS_LIST mmioFOURCC('p','c','h','l') +#define DMUS_FOURCC_PCHANNELS_ITEM mmioFOURCC('p','c','h','h') +/* Band */ +#define DMUS_FOURCC_BAND_FORM mmioFOURCC('D','M','B','D') +#define DMUS_FOURCC_INSTRUMENTS_LIST mmioFOURCC('l','b','i','l') +#define DMUS_FOURCC_INSTRUMENT_LIST mmioFOURCC('l','b','i','n') +#define DMUS_FOURCC_INSTRUMENT_CHUNK mmioFOURCC('b','i','n','s') +/* Chordmap */ +#define DMUS_FOURCC_CHORDMAP_FORM mmioFOURCC('D','M','P','R') +#define DMUS_FOURCC_IOCHORDMAP_CHUNK mmioFOURCC('p','e','r','h') +#define DMUS_FOURCC_SUBCHORD_CHUNK mmioFOURCC('c','h','d','t') +#define DMUS_FOURCC_CHORDENTRY_CHUNK mmioFOURCC('c','h','e','h') +#define DMUS_FOURCC_SUBCHORDID_CHUNK mmioFOURCC('s','b','c','n') +#define DMUS_FOURCC_IONEXTCHORD_CHUNK mmioFOURCC('n','c','r','d') +#define DMUS_FOURCC_NEXTCHORDSEQ_CHUNK mmioFOURCC('n','c','s','q') +#define DMUS_FOURCC_IOSIGNPOST_CHUNK mmioFOURCC('s','p','s','h') +#define DMUS_FOURCC_CHORDNAME_CHUNK mmioFOURCC('I','N','A','M') +#define DMUS_FOURCC_CHORDENTRY_LIST mmioFOURCC('c','h','o','e') +#define DMUS_FOURCC_CHORDMAP_LIST mmioFOURCC('c','m','a','p') +#define DMUS_FOURCC_CHORD_LIST mmioFOURCC('c','h','r','d') +#define DMUS_FOURCC_CHORDPALETTE_LIST mmioFOURCC('c','h','p','l') +#define DMUS_FOURCC_CADENCE_LIST mmioFOURCC('c','a','d','e') +#define DMUS_FOURCC_SIGNPOSTITEM_LIST mmioFOURCC('s','p','s','t') +#define DMUS_FOURCC_SIGNPOST_LIST mmioFOURCC('s','p','s','q') +/* Container */ +#define DMUS_FOURCC_CONTAINER_FORM mmioFOURCC('D','M','C','N') +#define DMUS_FOURCC_CONTAINER_CHUNK mmioFOURCC('c','o','n','h') +#define DMUS_FOURCC_CONTAINED_ALIAS_CHUNK mmioFOURCC('c','o','b','a') +#define DMUS_FOURCC_CONTAINED_OBJECT_CHUNK mmioFOURCC('c','o','b','h') +#define DMUS_FOURCC_CONTAINED_OBJECTS_LIST mmioFOURCC('c','o','s','l') +#define DMUS_FOURCC_CONTAINED_OBJECT_LIST mmioFOURCC('c','o','b','l') +/* DirectSound Buffer Configuration */ +#define DMUS_FOURCC_DSBC_FORM mmioFOURCC('D','S','B','C') +#define DMUS_FOURCC_DSBD_CHUNK mmioFOURCC('d','s','b','d') +#define DMUS_FOURCC_BSID_CHUNK mmioFOURCC('b','s','i','d') +#define DMUS_FOURCC_DS3D_CHUNK mmioFOURCC('d','s','3','d') +#define DMUS_FOURCC_DSBC_LIST mmioFOURCC('f','x','l','s') +/* Effects */ +#define DMUS_FOURCC_DSFX_FORM mmioFOURCC('D','S','F','X') +#define DMUS_FOURCC_DSFX_CHUNK mmioFOURCC('f','x','h','r') +#define DMUS_FOURCC_DSFX_DATA mmioFOURCC('d','a','t','a') +/* Reference */ +#define DMUS_FOURCC_REF_LIST mmioFOURCC('D','M','R','F') +#define DMUS_FOURCC_REF_CHUNK mmioFOURCC('r','e','f','h') +#define DMUS_FOURCC_DATE_CHUNK mmioFOURCC('d','a','t','e') +#define DMUS_FOURCC_NAME_CHUNK mmioFOURCC('n','a','m','e') +#define DMUS_FOURCC_FILE_CHUNK mmioFOURCC('f','i','l','e') +/* Script */ +#define DMUS_FOURCC_SCRIPT_FORM mmioFOURCC('D','M','S','C') +#define DMUS_FOURCC_SCRIPT_CHUNK mmioFOURCC('s','c','h','d') +#define DMUS_FOURCC_SCRIPTVERSION_CHUNK mmioFOURCC('s','c','v','e') +#define DMUS_FOURCC_SCRIPTLANGUAGE_CHUNK mmioFOURCC('s','c','l','a') +#define DMUS_FOURCC_SCRIPTSOURCE_CHUNK mmioFOURCC('s','c','s','r') +/* Segment */ +#define DMUS_FOURCC_SEGMENT_FORM mmioFOURCC('D','M','S','G') +#define DMUS_FOURCC_SEGMENT_CHUNK mmioFOURCC('s','e','g','h') +#define DMUS_FOURCC_TRACK_LIST mmioFOURCC('t','r','k','l') +/* Style chunks */ +#define DMUS_FOURCC_STYLE_FORM mmioFOURCC('D','M','S','T') +#define DMUS_FOURCC_STYLE_CHUNK mmioFOURCC('s','t','y','h') +#define DMUS_FOURCC_PART_LIST mmioFOURCC('p','a','r','t') +#define DMUS_FOURCC_PART_CHUNK mmioFOURCC('p','r','t','h') +#define DMUS_FOURCC_NOTE_CHUNK mmioFOURCC('n','o','t','e') +#define DMUS_FOURCC_CURVE_CHUNK mmioFOURCC('c','r','v','e') +#define DMUS_FOURCC_MARKER_CHUNK mmioFOURCC('m','r','k','r') +#define DMUS_FOURCC_RESOLUTION_CHUNK mmioFOURCC('r','s','l','n') +#define DMUS_FOURCC_ANTICIPATION_CHUNK mmioFOURCC('a','n','p','n') +#define DMUS_FOURCC_PATTERN_LIST mmioFOURCC('p','t','t','n') +#define DMUS_FOURCC_PATTERN_CHUNK mmioFOURCC('p','t','n','h') +#define DMUS_FOURCC_RHYTHM_CHUNK mmioFOURCC('r','h','t','m') +#define DMUS_FOURCC_PARTREF_LIST mmioFOURCC('p','r','e','f') +#define DMUS_FOURCC_PARTREF_CHUNK mmioFOURCC('p','r','f','c') +#define DMUS_FOURCC_STYLE_PERS_REF_LIST mmioFOURCC('p','r','r','f') +#define DMUS_FOURCC_MOTIFSETTINGS_CHUNK mmioFOURCC('m','t','f','s') +/* Tool */ +#define DMUS_FOURCC_TOOL_FORM mmioFOURCC('D','M','T','L') +#define DMUS_FOURCC_TOOL_CHUNK mmioFOURCC('t','o','l','h') +/* ToolGraph */ +#define DMUS_FOURCC_TOOLGRAPH_FORM mmioFOURCC('D','M','T','G') +#define DMUS_FOURCC_TOOL_LIST mmioFOURCC('t','o','l','l') +/* Track */ +#define DMUS_FOURCC_TRACK_FORM mmioFOURCC('D','M','T','K') +#define DMUS_FOURCC_TRACK_CHUNK mmioFOURCC('t','r','k','h') +#define DMUS_FOURCC_TRACK_EXTRAS_CHUNK mmioFOURCC('t','r','k','x') +/* Band Track */ +#define DMUS_FOURCC_BANDTRACK_FORM mmioFOURCC('D','M','B','T') +#define DMUS_FOURCC_BANDTRACK_CHUNK mmioFOURCC('b','d','t','h') +#define DMUS_FOURCC_BANDS_LIST mmioFOURCC('l','b','d','l') +#define DMUS_FOURCC_BAND_LIST mmioFOURCC('l','b','n','d') +#define DMUS_FOURCC_BANDITEM_CHUNK mmioFOURCC('b','d','i','h') +#define DMUS_FOURCC_BANDITEM_CHUNK2 mmioFOURCC('b','d','2','h') +/* Chord Track */ +#define DMUS_FOURCC_CHORDTRACK_LIST mmioFOURCC('c','o','r','d') +#define DMUS_FOURCC_CHORDTRACKHEADER_CHUNK mmioFOURCC('c','r','d','h') +#define DMUS_FOURCC_CHORDTRACKBODY_CHUNK mmioFOURCC('c','r','d','b') +/* Chordmap Track */ +#define DMUS_FOURCC_PERS_TRACK_LIST mmioFOURCC('p','f','t','r') +#define DMUS_FOURCC_PERS_REF_LIST mmioFOURCC('p','f','r','f') +#define DMUS_FOURCC_TIME_STAMP_CHUNK mmioFOURCC('s','t','m','p') +/* Command Track */ +#define DMUS_FOURCC_COMMANDTRACK_CHUNK mmioFOURCC('c','m','n','d') +/* Lyrics Track */ +#define DMUS_FOURCC_LYRICSTRACK_LIST mmioFOURCC('l','y','r','t') +#define DMUS_FOURCC_LYRICSTRACKEVENTS_LIST mmioFOURCC('l','y','r','l') +#define DMUS_FOURCC_LYRICSTRACKEVENT_LIST mmioFOURCC('l','y','r','e') +#define DMUS_FOURCC_LYRICSTRACKEVENTHEADER_CHUNK mmioFOURCC('l','y','r','h') +#define DMUS_FOURCC_LYRICSTRACKEVENTTEXT_CHUNK mmioFOURCC('l','y','r','n') +/* Marker Track */ +#define DMUS_FOURCC_MARKERTRACK_LIST mmioFOURCC('M','A','R','K') +#define DMUS_FOURCC_VALIDSTART_CHUNK mmioFOURCC('v','a','l','s') +#define DMUS_FOURCC_PLAYMARKER_CHUNK mmioFOURCC('p','l','a','y') +/* Mute Track */ +#define DMUS_FOURCC_MUTE_CHUNK mmioFOURCC('m','u','t','e') +/* Parameter Control Track */ +#define DMUS_FOURCC_PARAMCONTROLTRACK_TRACK_LIST mmioFOURCC('p','r','m','t') +#define DMUS_FOURCC_PARAMCONTROLTRACK_OBJECT_LIST mmioFOURCC('p','r','o','l') +#define DMUS_FOURCC_PARAMCONTROLTRACK_OBJECT_CHUNK mmioFOURCC('p','r','o','h') +#define DMUS_FOURCC_PARAMCONTROLTRACK_PARAM_LIST mmioFOURCC('p','r','p','l') +#define DMUS_FOURCC_PARAMCONTROLTRACK_PARAM_CHUNK mmioFOURCC('p','r','p','h') +#define DMUS_FOURCC_PARAMCONTROLTRACK_CURVES_CHUNK mmioFOURCC('p','r','c','c') +/* Pattern Track */ +#define DMUS_FOURCC_PATTERN_FORM mmioFOURCC('D','M','P','T') +/* Script Track */ +#define DMUS_FOURCC_SCRIPTTRACK_LIST mmioFOURCC('s','c','r','t') +#define DMUS_FOURCC_SCRIPTTRACKEVENTS_LIST mmioFOURCC('s','c','r','l') +#define DMUS_FOURCC_SCRIPTTRACKEVENT_LIST mmioFOURCC('s','c','r','e') +#define DMUS_FOURCC_SCRIPTTRACKEVENTHEADER_CHUNK mmioFOURCC('s','c','r','h') +#define DMUS_FOURCC_SCRIPTTRACKEVENTNAME_CHUNK mmioFOURCC('s','c','r','n') +/* Segment Trgigger Track */ +#define DMUS_FOURCC_SEGTRACK_LIST mmioFOURCC('s','e','g','t') +#define DMUS_FOURCC_SEGTRACK_CHUNK mmioFOURCC('s','g','t','h') +#define DMUS_FOURCC_SEGMENTS_LIST mmioFOURCC('l','s','g','l') +#define DMUS_FOURCC_SEGMENT_LIST mmioFOURCC('l','s','e','g') +#define DMUS_FOURCC_SEGMENTITEM_CHUNK mmioFOURCC('s','g','i','h') +#define DMUS_FOURCC_SEGMENTITEMNAME_CHUNK mmioFOURCC('s','n','a','m') +/* Sequence Track */ +#define DMUS_FOURCC_SEQ_TRACK mmioFOURCC('s','e','q','t') +#define DMUS_FOURCC_SEQ_LIST mmioFOURCC('e','v','t','l') +#define DMUS_FOURCC_CURVE_LIST mmioFOURCC('c','u','r','l') +/* Signpost Track */ +#define DMUS_FOURCC_SIGNPOST_TRACK_CHUNK mmioFOURCC('s','g','n','p') +/* Style Track */ +#define DMUS_FOURCC_STYLE_TRACK_LIST mmioFOURCC('s','t','t','r') +#define DMUS_FOURCC_STYLE_REF_LIST mmioFOURCC('s','t','r','f') +/* SysEx Track */ +#define DMUS_FOURCC_SYSEX_TRACK mmioFOURCC('s','y','e','x') +/* Tempo Track */ +#define DMUS_FOURCC_TEMPO_TRACK mmioFOURCC('t','e','t','r') +/* Time Signature Track */ +#define DMUS_FOURCC_TIMESIGNATURE_TRACK mmioFOURCC('t','i','m','s') +#define DMUS_FOURCC_TIMESIGTRACK_LIST mmioFOURCC('T','I','M','S') +#define DMUS_FOURCC_TIMESIG_CHUNK DMUS_FOURCC_TIMESIGNATURE_TRACK +/* Wave Track */ +#define DMUS_FOURCC_WAVETRACK_LIST mmioFOURCC('w','a','v','t') +#define DMUS_FOURCC_WAVETRACK_CHUNK mmioFOURCC('w','a','t','h') +#define DMUS_FOURCC_WAVEPART_LIST mmioFOURCC('w','a','v','p') +#define DMUS_FOURCC_WAVEPART_CHUNK mmioFOURCC('w','a','p','h') +#define DMUS_FOURCC_WAVEITEM_LIST mmioFOURCC('w','a','v','i') +#define DMUS_FOURCC_WAVE_LIST mmioFOURCC('w','a','v','e') +#define DMUS_FOURCC_WAVEITEM_CHUNK mmioFOURCC('w','a','i','h') +/* Wave Header */ +#define DMUS_FOURCC_WAVEHEADER_CHUNK mmioFOURCC('w','a','v','h') + + +/***************************************************************************** + * Flags + */ +#define DMUS_BUFFERF_SHARED 0x1 +#define DMUS_BUFFERF_DEFINED 0x2 +#define DMUS_BUFFERF_MIXIN 0x8 + +#define DMUS_CHORDMAPF_VERSION8 0x1 + +#define DMUS_CONTAINED_OBJF_KEEP 0x1 + +#define DMUS_CONTAINER_NOLOADS 0x2 + +#define DMUS_IO_INST_PATCH 0x0001 +#define DMUS_IO_INST_BANKSELECT 0x0002 +#define DMUS_IO_INST_ASSIGN_PATCH 0x0008 +#define DMUS_IO_INST_NOTERANGES 0x0010 +#define DMUS_IO_INST_PAN 0x0020 +#define DMUS_IO_INST_VOLUME 0x0040 +#define DMUS_IO_INST_TRANSPOSE 0x0080 +#define DMUS_IO_INST_GM 0x0100 +#define DMUS_IO_INST_GS 0x0200 +#define DMUS_IO_INST_XG 0x0400 +#define DMUS_IO_INST_CHANNEL_PRIORITY 0x0800 +#define DMUS_IO_INST_USE_DEFAULT_GM_SET 0x1000 +#define DMUS_IO_INST_PITCHBENDRANGE 0x2000 + +#define DMUS_IO_SCRIPTTRACKF_PREPARE 0x1 +#define DMUS_IO_SCRIPTTRACKF_QUEUE 0x2 +#define DMUS_IO_SCRIPTTRACKF_ATTIME 0x4 + +#define DMUS_MARKERF_START 0x1 +#define DMUS_MARKERF_STOP 0x2 +#define DMUS_MARKERF_CHORD_ALIGN 0x4 + +#define DMUS_PATTERNF_PERSIST_CONTROL 0x1 + +#define DMUS_PARTF_USE_MARKERS 0x1 +#define DMUS_PARTF_ALIGN_CHORDS 0x2 + +#define DMUS_PORTCONFIGF_DRUMSON10 0x1 +#define DMUS_PORTCONFIGF_USEDEFAULT 0x2 + +#define DMUS_SCRIPTIOF_LOAD_ALL_CONTENT 0x1 +#define DMUS_SCRIPTIOF_DOWNLOAD_ALL_SEGMENTS 0x2 + +#define DMUS_SEGIOF_REFLENGTH 0x1 +#define DMUS_SEGIOF_CLOCKTIME 0x2 + +#define DMUS_SEGMENTTRACKF_MOTIF 0x1 + +/* Song flags; MS doesn't support this in DX 9.0 anymore */ +#define DMUS_SONG_MAXSEGID 0x7FFFFFFF +#define DMUS_SONG_ANYSEG 0x80000000 +#define DMUS_SONG_NOSEG 0xFFFFFFFF +#define DMUS_SONG_NOFROMSEG 0x80000001 + +#define DMUS_SIGNPOSTF_A 0x0001 +#define DMUS_SIGNPOSTF_B 0x0002 +#define DMUS_SIGNPOSTF_C 0x0004 +#define DMUS_SIGNPOSTF_D 0x0008 +#define DMUS_SIGNPOSTF_E 0x0010 +#define DMUS_SIGNPOSTF_F 0x0020 +#define DMUS_SIGNPOSTF_1 0x0100 +#define DMUS_SIGNPOSTF_2 0x0200 +#define DMUS_SIGNPOSTF_3 0x0400 +#define DMUS_SIGNPOSTF_4 0x0800 +#define DMUS_SIGNPOSTF_5 0x1000 +#define DMUS_SIGNPOSTF_6 0x2000 +#define DMUS_SIGNPOSTF_7 0x4000 +#define DMUS_SIGNPOSTF_CADENCE 0x8000 +#define DMUS_SIGNPOSTF_LETTER (DMUS_SIGNPOSTF_A | DMUS_SIGNPOSTF_B | DMUS_SIGNPOSTF_C | DMUS_SIGNPOSTF_D | DMUS_SIGNPOSTF_E | DMUS_SIGNPOSTF_F) +#define DMUS_SIGNPOSTF_ROOT (DMUS_SIGNPOSTF_1 | DMUS_SIGNPOSTF_2 | DMUS_SIGNPOSTF_3 | DMUS_SIGNPOSTF_4 | DMUS_SIGNPOSTF_5 | DMUS_SIGNPOSTF_6 | DMUS_SIGNPOSTF_7) + +#define DMUS_SPOSTCADENCEF_1 0x2 +#define DMUS_SPOSTCADENCEF_2 0x4 + +#define DMUS_VARIATIONF_MAJOR 0x0000007F +#define DMUS_VARIATIONF_MINOR 0x00003F80 +#define DMUS_VARIATIONF_OTHER 0x001FC000 +#define DMUS_VARIATIONF_ROOT_SCALE 0x00200000 +#define DMUS_VARIATIONF_ROOT_FLAT 0x00400000 +#define DMUS_VARIATIONF_ROOT_SHARP 0x00800000 +#define DMUS_VARIATIONF_TYPE_TRIAD 0x01000000 +#define DMUS_VARIATIONF_TYPE_6AND7 0x02000000 +#define DMUS_VARIATIONF_TYPE_COMPLEX 0x04000000 +#define DMUS_VARIATIONF_DEST_TO1 0x08000000 +#define DMUS_VARIATIONF_DEST_TO5 0x10000000 +#define DMUS_VARIATIONF_DEST_OTHER 0x40000000 +#define DMUS_VARIATIONF_MODES 0xE0000000 +#define DMUS_VARIATIONF_MODES_EX (0x20000000 | 0x80000000) +#define DMUS_VARIATIONF_IMA25_MODE 0x00000000 +#define DMUS_VARIATIONF_DMUS_MODE 0x20000000 + +#define DMUS_WAVETRACKF_SYNC_VAR 0x1 +#define DMUS_WAVETRACKF_PERSIST_CONTROL 0x2 + + +/***************************************************************************** + * Enumerations + */ +/* typedef definitions */ +typedef enum enumDMUS_VARIATIONT_TYPES DMUS_VARIATIONT_TYPES; +typedef enum enumDMUS_EMBELLISHT_TYPES DMUS_EMBELLISHT_TYPES; +typedef enum enumDMUS_PATTERNT_TYPES DMUS_PATTERNT_TYPES; + +/* actual enumerations */ +enum enumDMUS_VARIATIONT_TYPES { + DMUS_VARIATIONT_SEQUENTIAL = 0x0, + DMUS_VARIATIONT_RANDOM = 0x1, + DMUS_VARIATIONT_RANDOM_START = 0x2, + DMUS_VARIATIONT_NO_REPEAT = 0x3, + DMUS_VARIATIONT_RANDOM_ROW = 0x4 +}; + +enum enumDMUS_EMBELLISHT_TYPES { + DMUS_EMBELLISHT_NORMAL = 0x0000, + DMUS_EMBELLISHT_FILL = 0x0001, + DMUS_EMBELLISHT_BREAK = 0x0002, + DMUS_EMBELLISHT_INTRO = 0x0004, + DMUS_EMBELLISHT_END = 0x0008, + DMUS_EMBELLISHT_MOTIF = 0x0010, + DMUS_EMBELLISHT_ALL = 0xFFFF +}; + +enum enumDMUS_PATTERNT_TYPES { + DMUS_PATTERNT_RANDOM = 0x0, + DMUS_PATTERNT_REPEAT = 0x1, + DMUS_PATTERNT_SEQUENTIAL = 0x2, + DMUS_PATTERNT_RANDOM_START = 0x3, + DMUS_PATTERNT_NO_REPEAT = 0x4, + DMUS_PATTERNT_RANDOM_ROW = 0x5 +}; + + +/***************************************************************************** + * Structures + */ +/* typedef definitions */ +typedef struct _DMUS_IO_SEQ_ITEM DMUS_IO_SEQ_ITEM, *LPDMUS_IO_SEQ_ITEM; +typedef struct _DMUS_IO_CURVE_ITEM DMUS_IO_CURVE_ITEM, *LPDMUS_IO_CURVE_ITEM; +typedef struct _DMUS_IO_TEMPO_ITEM DMUS_IO_TEMPO_ITEM, *LPDMUS_IO_TEMPO_ITEM; +typedef struct _DMUS_IO_SYSEX_ITEM DMUS_IO_SYSEX_ITEM, *LPDMUS_IO_SYSEX_ITEM; +typedef struct DMUS_CHORD_KEY DMUS_CHORD_PARAM, *LPDMUS_CHORD_PARAM; /* in dmusici.h */ +typedef struct _DMUS_RHYTHM_PARAM DMUS_RHYTHM_PARAM, *LPDMUS_RHYTHM_PARAM; +typedef struct _DMUS_TEMPO_PARAM DMUS_TEMPO_PARAM, *LPDMUS_TEMPO_PARAM; +typedef struct _DMUS_MUTE_PARAM DMUS_MUTE_PARAM, *LPDMUS_MUTE_PARAM; +typedef struct _DMUS_IO_TIMESIG DMUS_IO_TIMESIG, *LPDMUS_IO_TIMESIG; +typedef struct _DMUS_IO_STYLE DMUS_IO_STYLE, *LPDMUS_IO_STYLE; +typedef struct _DMUS_IO_VERSION DMUS_IO_VERSION, *LPDMUS_IO_VERSION; +typedef struct _DMUS_IO_PATTERN DMUS_IO_PATTERN, *LPDMUS_IO_PATTERN; +typedef struct _DMUS_IO_STYLEPART DMUS_IO_STYLEPART, *LPDMUS_IO_STYLEPART; +typedef struct _DMUS_IO_PARTREF DMUS_IO_PARTREF, *LPDMUS_IO_PARTREF; +typedef struct _DMUS_IO_STYLENOTE DMUS_IO_STYLENOTE, *LPDMUS_IO_STYLENOTE; +typedef struct _DMUS_IO_STYLECURVE DMUS_IO_STYLECURVE, *LPDMUS_IO_STYLECURVE; +typedef struct _DMUS_IO_STYLEMARKER DMUS_IO_STYLEMARKER, *LPDMUS_IO_STYLEMARKER; +typedef struct _DMUS_IO_STYLERESOLUTION DMUS_IO_STYLERESOLUTION, *LPDMUS_IO_STYLERESOLUTION; +typedef struct _DMUS_IO_STYLE_ANTICIPATION DMUS_IO_STYLE_ANTICIPATION, *LPDMUS_IO_STYLE_ANTICIPATION; +typedef struct _DMUS_IO_MOTIFSETTINGS DMUS_IO_MOTIFSETTINGS, *LPDMUS_IO_MOTIFSETTINGS; +typedef struct _DMUS_IO_CHORD DMUS_IO_CHORD, *LPDMUS_IO_CHORD; +typedef struct _DMUS_IO_SUBCHORD DMUS_IO_SUBCHORD, *LPDMUS_IO_SUBCHORD; +typedef struct _DMUS_IO_COMMAND DMUS_IO_COMMAND, *LPDMUS_IO_COMMAND; +typedef struct _DMUS_IO_TOOL_HEADER DMUS_IO_TOOL_HEADER, *LPDMUS_IO_TOOL_HEADER; +typedef struct _DMUS_IO_PORTCONFIG_HEADER DMUS_IO_PORTCONFIG_HEADER, *LPDMUS_IO_PORTCONFIG_HEADER; +typedef struct _DMUS_IO_PCHANNELTOBUFFER_HEADER DMUS_IO_PCHANNELTOBUFFER_HEADER, *LPDMUS_IO_PCHANNELTOBUFFER_HEADER; +typedef struct _DMUS_IO_BUFFER_ATTRIBUTES_HEADER DMUS_IO_BUFFER_ATTRIBUTES_HEADER, *LPDMUS_IO_BUFFER_ATTRIBUTES_HEADER; +typedef struct _DMUS_IO_BAND_TRACK_HEADER DMUS_IO_BAND_TRACK_HEADER, *LPDMUS_IO_BAND_TRACK_HEADER; +typedef struct _DMUS_IO_BAND_ITEM_HEADER DMUS_IO_BAND_ITEM_HEADER, *LPDMUS_IO_BAND_ITEM_HEADER; +typedef struct _DMUS_IO_BAND_ITEM_HEADER2 DMUS_IO_BAND_ITEM_HEADER2, *LPDMUS_IO_BAND_ITEM_HEADER2; +typedef struct _DMUS_IO_INSTRUMENT DMUS_IO_INSTRUMENT, *LPDMUS_IO_INSTRUMENT; +typedef struct _DMUS_IO_WAVE_HEADER DMUS_IO_WAVE_HEADER, *LPDMUS_IO_WAVE_HEADER; +typedef struct _DMUS_IO_WAVE_TRACK_HEADER DMUS_IO_WAVE_TRACK_HEADER, *LPDMUS_IO_WAVE_TRACK_HEADER; +typedef struct _DMUS_IO_WAVE_PART_HEADER DMUS_IO_WAVE_PART_HEADER, *LPDMUS_IO_WAVE_PART_HEADER; +typedef struct _DMUS_IO_WAVE_ITEM_HEADER DMUS_IO_WAVE_ITEM_HEADER, *LPDMUS_IO_WAVE_ITEM_HEADER; +typedef struct _DMUS_IO_CONTAINER_HEADER DMUS_IO_CONTAINER_HEADER, *LPDMUS_IO_CONTAINER_HEADER; +typedef struct _DMUS_IO_CONTAINED_OBJECT_HEADER DMUS_IO_CONTAINED_OBJECT_HEADER, *LPDMUS_IO_CONTAINED_OBJECT_HEADER; +typedef struct _DMUS_IO_SEGMENT_HEADER DMUS_IO_SEGMENT_HEADER, *LPDMUS_IO_SEGMENT_HEADER; +typedef struct _DMUS_IO_TRACK_HEADER DMUS_IO_TRACK_HEADER, *LPDMUS_IO_TRACK_HEADER; +typedef struct _DMUS_IO_TRACK_EXTRAS_HEADER DMUS_IO_TRACK_EXTRAS_HEADER, *LPDMUS_IO_TRACK_EXTRAS_HEADER; +typedef struct _DMUS_IO_REFERENCE DMUS_IO_REFERENCE, *LPDMUS_IO_REFERENCE; +typedef struct _DMUS_IO_CHORDMAP DMUS_IO_CHORDMAP, *LPDMUS_IO_CHORDMAP; +typedef struct _DMUS_IO_CHORDMAP_SUBCHORD DMUS_IO_CHORDMAP_SUBCHORD, *LPDMUS_IO_CHORDMAP_SUBCHORD; +typedef struct _DMUS_IO_CHORDMAP_SUBCHORD DMUS_IO_PERS_SUBCHORD, *LPDMUS_IO_PERS_SUBCHORD; +typedef struct _DMUS_IO_CHORDENTRY DMUS_IO_CHORDENTRY, *LPDMUS_IO_CHORDENTRY; +typedef struct _DMUS_IO_NEXTCHORD DMUS_IO_NEXTCHORD, *LPDMUS_IO_NEXTCHORD; +typedef struct _DMUS_IO_CHORDMAP_SIGNPOST DMUS_IO_CHORDMAP_SIGNPOST, *LPDMUS_IO_CHORDMAP_SIGNPOST; +typedef struct _DMUS_IO_CHORDMAP_SIGNPOST DMUS_IO_PERS_SIGNPOST, *LPDMUS_IO_PERS_SIGNPOST; +typedef struct _DMUS_IO_SCRIPT_HEADER DMUS_IO_SCRIPT_HEADER, *LPDMUS_IO_SCRIPT_HEADER; +typedef struct _DMUS_IO_SIGNPOST DMUS_IO_SIGNPOST, *LPDMUS_IO_SIGNPOST; +typedef struct _DMUS_IO_MUTE DMUS_IO_MUTE, *LPDMUS_IO_MUTE; +typedef struct _DMUS_IO_TIMESIGNATURE_ITEM DMUS_IO_TIMESIGNATURE_ITEM, *LPDMUS_IO_TIMESIGNATURE_ITEM; +typedef struct _DMUS_IO_VALID_START DMUS_IO_VALID_START, *LPDMUS_IO_VALID_START; +typedef struct _DMUS_IO_PLAY_MARKER DMUS_IO_PLAY_MARKER, *LPDMUS_IO_PLAY_MARKER; +typedef struct _DMUS_IO_SEGMENT_TRACK_HEADER DMUS_IO_SEGMENT_TRACK_HEADER, *LPDMUS_IO_SEGMENT_TRACK_HEADER; +typedef struct _DMUS_IO_SEGMENT_ITEM_HEADER DMUS_IO_SEGMENT_ITEM_HEADER, *LPDMUS_IO_SEGMENT_ITEM_HEADER; +typedef struct _DMUS_IO_SCRIPTTRACK_EVENTHEADER DMUS_IO_SCRIPTTRACK_EVENTHEADER, *LPDMUS_IO_SCRIPTTRACK_EVENTHEADER; +typedef struct _DMUS_IO_LYRICSTRACK_EVENTHEADER DMUS_IO_LYRICSTRACK_EVENTHEADER, *LPDMUS_IO_LYRICSTRACK_EVENTHEADER; +typedef struct _DMUS_IO_PARAMCONTROLTRACK_OBJECTHEADER DMUS_IO_PARAMCONTROLTRACK_OBJECTHEADER, *LPDMUS_IO_PARAMCONTROLTRACK_OBJECTHEADER; +typedef struct _DMUS_IO_PARAMCONTROLTRACK_PARAMHEADER DMUS_IO_PARAMCONTROLTRACK_PARAMHEADER, *LPDMUS_IO_PARAMCONTROLTRACK_PARAMHEADER; +typedef struct _DMUS_IO_PARAMCONTROLTRACK_CURVEINFO DMUS_IO_PARAMCONTROLTRACK_CURVEINFO, *LPDMUS_IO_PARAMCONTROLTRACK_CURVEINFO; +typedef struct _DSOUND_IO_DSBUFFERDESC DSOUND_IO_DSBUFFERDESC, *LPDSOUND_IO_DSBUFFERDESC; +typedef struct _DSOUND_IO_DSBUSID DSOUND_IO_DSBUSID, *LPDSOUND_IO_DSBUSID; +typedef struct _DSOUND_IO_3D DSOUND_IO_3D, *LPDSOUND_IO_3D; +typedef struct _DSOUND_IO_DXDMO_HEADER DSOUND_IO_DXDMO_HEADER, *LPDSOUND_IO_DXDMO_HEADER; +typedef struct _DSOUND_IO_DXDMO_DATA DSOUND_IO_DXDMO_DATA, *LPDSOUND_IO_DXDMO_DATA; + +/* actual structures */ +struct _DMUS_IO_SEQ_ITEM { + MUSIC_TIME mtTime; + MUSIC_TIME mtDuration; + DWORD dwPChannel; + short nOffset; + BYTE bStatus; + BYTE bByte1; + BYTE bByte2; +}; + +struct _DMUS_IO_CURVE_ITEM { + MUSIC_TIME mtStart; + MUSIC_TIME mtDuration; + MUSIC_TIME mtResetDuration; + DWORD dwPChannel; + short nOffset; + short nStartValue; + short nEndValue; + short nResetValue; + BYTE bType; + BYTE bCurveShape; + BYTE bCCData; + BYTE bFlags; + /* DX8 */ + WORD wParamType; + WORD wMergeIndex; +}; + +struct _DMUS_IO_TEMPO_ITEM { + MUSIC_TIME lTime; + double dblTempo; +}; + +struct _DMUS_IO_SYSEX_ITEM { + MUSIC_TIME mtTime; + DWORD dwPChannel; + DWORD dwSysExLength; +}; + +struct _DMUS_RHYTHM_PARAM { + DMUS_TIMESIGNATURE TimeSig; + DWORD dwRhythmPattern; +}; + +struct _DMUS_TEMPO_PARAM { + MUSIC_TIME mtTime; + double dblTempo; +}; + +struct _DMUS_MUTE_PARAM { + DWORD dwPChannel; + DWORD dwPChannelMap; + BOOL fMute; +}; + +#pragma pack(2) +struct _DMUS_IO_TIMESIG { + BYTE bBeatsPerMeasure; + BYTE bBeat; + WORD wGridsPerBeat; +}; + +struct _DMUS_IO_STYLE { + DMUS_IO_TIMESIG timeSig; + double dblTempo; +}; + +struct _DMUS_IO_VERSION { + DWORD dwVersionMS; + DWORD dwVersionLS; +}; + +struct _DMUS_IO_PATTERN { + DMUS_IO_TIMESIG timeSig; + BYTE bGrooveBottom; + BYTE bGrooveTop; + WORD wEmbellishment; + WORD wNbrMeasures; + BYTE bDestGrooveBottom; + BYTE bDestGrooveTop; + DWORD dwFlags; +}; + +struct _DMUS_IO_STYLEPART { + DMUS_IO_TIMESIG timeSig; + DWORD dwVariationChoices[32]; + GUID guidPartID; + WORD wNbrMeasures; + BYTE bPlayModeFlags; + BYTE bInvertUpper; + BYTE bInvertLower; + BYTE bPad[3]; + DWORD dwFlags; +}; + +struct _DMUS_IO_PARTREF { + GUID guidPartID; + WORD wLogicalPartID; + BYTE bVariationLockID; + BYTE bSubChordLevel; + BYTE bPriority; + BYTE bRandomVariation; + WORD wPad; + DWORD dwPChannel; +}; + + +struct _DMUS_IO_STYLENOTE { + MUSIC_TIME mtGridStart; + DWORD dwVariation; + MUSIC_TIME mtDuration; + short nTimeOffset; + WORD wMusicValue; + BYTE bVelocity; + BYTE bTimeRange; + BYTE bDurRange; + BYTE bVelRange; + BYTE bInversionID; + BYTE bPlayModeFlags; + /* DX8 */ + BYTE bNoteFlags; +}; + +struct _DMUS_IO_STYLECURVE { + MUSIC_TIME mtGridStart; + DWORD dwVariation; + MUSIC_TIME mtDuration; + MUSIC_TIME mtResetDuration; + short nTimeOffset; + short nStartValue; + short nEndValue; + short nResetValue; + BYTE bEventType; + BYTE bCurveShape; + BYTE bCCData; + BYTE bFlags; + /* DX8 */ + WORD wParamType; + WORD wMergeIndex; +}; + +struct _DMUS_IO_STYLEMARKER { + MUSIC_TIME mtGridStart; + DWORD dwVariation; + WORD wMarkerFlags; +}; + +struct _DMUS_IO_STYLERESOLUTION { + DWORD dwVariation; + WORD wMusicValue; + BYTE bInversionID; + BYTE bPlayModeFlags; +}; + +struct _DMUS_IO_STYLE_ANTICIPATION { + MUSIC_TIME mtGridStart; + DWORD dwVariation; + short nTimeOffset; + BYTE bTimeRange; +}; + +struct _DMUS_IO_MOTIFSETTINGS { + DWORD dwRepeats; + MUSIC_TIME mtPlayStart; + MUSIC_TIME mtLoopStart; + MUSIC_TIME mtLoopEnd; + DWORD dwResolution; +}; +#pragma pack() + +struct _DMUS_IO_CHORD { + WCHAR wszName[16]; + MUSIC_TIME mtTime; + WORD wMeasure; + BYTE bBeat; + BYTE bFlags; +}; + +struct _DMUS_IO_SUBCHORD { + DWORD dwChordPattern; + DWORD dwScalePattern; + DWORD dwInversionPoints; + DWORD dwLevels; + BYTE bChordRoot; + BYTE bScaleRoot; +}; + +struct _DMUS_IO_COMMAND { + MUSIC_TIME mtTime; + WORD wMeasure; + BYTE bBeat; + BYTE bCommand; + BYTE bGrooveLevel; + BYTE bGrooveRange; + BYTE bRepeatMode; +}; + +struct _DMUS_IO_TOOL_HEADER { + GUID guidClassID; + LONG lIndex; + DWORD cPChannels; + FOURCC ckid; + FOURCC fccType; + DWORD dwPChannels[1]; +}; + +struct _DMUS_IO_PORTCONFIG_HEADER { + GUID guidPort; + DWORD dwPChannelBase; + DWORD dwPChannelCount; + DWORD dwFlags; +}; + +struct _DMUS_IO_PCHANNELTOBUFFER_HEADER { + DWORD dwPChannelBase; + DWORD dwPChannelCount; + DWORD dwBufferCount; + DWORD dwFlags; +}; + +struct _DMUS_IO_BUFFER_ATTRIBUTES_HEADER { + GUID guidBufferID; + DWORD dwFlags; +}; + +struct _DMUS_IO_BAND_TRACK_HEADER { + BOOL bAutoDownload; +}; + +struct _DMUS_IO_BAND_ITEM_HEADER { + MUSIC_TIME lBandTime; +}; + +struct _DMUS_IO_BAND_ITEM_HEADER2 { + MUSIC_TIME lBandTimeLogical; + MUSIC_TIME lBandTimePhysical; +}; + +struct _DMUS_IO_INSTRUMENT { + DWORD dwPatch; + DWORD dwAssignPatch; + DWORD dwNoteRanges[4]; + DWORD dwPChannel; + DWORD dwFlags; + BYTE bPan; + BYTE bVolume; + short nTranspose; + DWORD dwChannelPriority; + short nPitchBendRange; +}; + +struct _DMUS_IO_WAVE_HEADER { + REFERENCE_TIME rtReadAhead; + DWORD dwFlags; +}; + +struct _DMUS_IO_WAVE_TRACK_HEADER { + LONG lVolume; + DWORD dwFlags; +}; + +struct _DMUS_IO_WAVE_PART_HEADER { + LONG lVolume; + DWORD dwVariations; + DWORD dwPChannel; + DWORD dwLockToPart; + DWORD dwFlags; + DWORD dwIndex; +}; + +struct _DMUS_IO_WAVE_ITEM_HEADER { + LONG lVolume; + LONG lPitch; + DWORD dwVariations; + REFERENCE_TIME rtTime; + REFERENCE_TIME rtStartOffset; + REFERENCE_TIME rtReserved; + REFERENCE_TIME rtDuration; + MUSIC_TIME mtLogicalTime; + DWORD dwLoopStart; + DWORD dwLoopEnd; + DWORD dwFlags; + WORD wVolumeRange; + WORD wPitchRange; +}; + +struct _DMUS_IO_CONTAINER_HEADER { + DWORD dwFlags; +}; + +struct _DMUS_IO_CONTAINED_OBJECT_HEADER { + GUID guidClassID; + DWORD dwFlags; + FOURCC ckid; + FOURCC fccType; +}; + +struct _DMUS_IO_SEGMENT_HEADER { + DWORD dwRepeats; + MUSIC_TIME mtLength; + MUSIC_TIME mtPlayStart; + MUSIC_TIME mtLoopStart; + MUSIC_TIME mtLoopEnd; + DWORD dwResolution; + /* DX8 */ + REFERENCE_TIME rtLength; + DWORD dwFlags; + DWORD dwReserved; + /* DX9 */ + REFERENCE_TIME rtLoopStart; + REFERENCE_TIME rtLoopEnd; + REFERENCE_TIME rtPlayStart; +}; + +struct _DMUS_IO_TRACK_HEADER { + GUID guidClassID; + DWORD dwPosition; + DWORD dwGroup; + FOURCC ckid; + FOURCC fccType; +}; + +struct _DMUS_IO_TRACK_EXTRAS_HEADER { + DWORD dwFlags; + DWORD dwPriority; +}; + +struct _DMUS_IO_REFERENCE { + GUID guidClassID; + DWORD dwValidData; +}; + +struct _DMUS_IO_CHORDMAP { + WCHAR wszLoadName[20]; + DWORD dwScalePattern; + DWORD dwFlags; +}; + +struct _DMUS_IO_CHORDMAP_SUBCHORD { + DWORD dwChordPattern; + DWORD dwScalePattern; + DWORD dwInvertPattern; + BYTE bChordRoot; + BYTE bScaleRoot; + WORD wCFlags; + DWORD dwLevels; +}; + +struct _DMUS_IO_CHORDENTRY { + DWORD dwFlags; + WORD wConnectionID; +}; + +struct _DMUS_IO_NEXTCHORD { + DWORD dwFlags; + WORD nWeight; + WORD wMinBeats; + WORD wMaxBeats; + WORD wConnectionID; +}; + +struct _DMUS_IO_CHORDMAP_SIGNPOST { + DWORD dwChords; + DWORD dwFlags; +}; + +struct _DMUS_IO_SCRIPT_HEADER { + DWORD dwFlags; +}; + +struct _DMUS_IO_SIGNPOST { + MUSIC_TIME mtTime; + DWORD dwChords; + WORD wMeasure; +}; + +struct _DMUS_IO_MUTE { + MUSIC_TIME mtTime; + DWORD dwPChannel; + DWORD dwPChannelMap; +}; + +struct _DMUS_IO_TIMESIGNATURE_ITEM { + MUSIC_TIME lTime; + BYTE bBeatsPerMeasure; + BYTE bBeat; + WORD wGridsPerBeat; +}; + +struct _DMUS_IO_VALID_START { + MUSIC_TIME mtTime; +}; + +struct _DMUS_IO_PLAY_MARKER { + MUSIC_TIME mtTime; +}; + +struct _DMUS_IO_SEGMENT_TRACK_HEADER { + DWORD dwFlags; +}; + +struct _DMUS_IO_SEGMENT_ITEM_HEADER { + MUSIC_TIME lTimeLogical; + MUSIC_TIME lTimePhysical; + DWORD dwPlayFlags; + DWORD dwFlags; +}; + +struct _DMUS_IO_SCRIPTTRACK_EVENTHEADER { + DWORD dwFlags; + MUSIC_TIME lTimeLogical; + MUSIC_TIME lTimePhysical; +}; + +struct _DMUS_IO_LYRICSTRACK_EVENTHEADER { + DWORD dwFlags; + DWORD dwTimingFlags; + MUSIC_TIME lTimeLogical; + MUSIC_TIME lTimePhysical; +}; + +struct _DMUS_IO_PARAMCONTROLTRACK_OBJECTHEADER { + DWORD dwFlags; + GUID guidTimeFormat; + DWORD dwPChannel; + DWORD dwStage; + DWORD dwBuffer; + GUID guidObject; + DWORD dwIndex; +}; + +struct _DMUS_IO_PARAMCONTROLTRACK_PARAMHEADER { + DWORD dwFlags; + DWORD dwIndex; +}; + +struct _DMUS_IO_PARAMCONTROLTRACK_CURVEINFO { + MUSIC_TIME mtStartTime; + MUSIC_TIME mtEndTime; + float fltStartValue; + float fltEndValue; + DWORD dwCurveType; + DWORD dwFlags; +}; + +struct _DSOUND_IO_DSBUFFERDESC { + DWORD dwFlags; + WORD nChannels; + LONG lVolume; + LONG lPan; + DWORD dwReserved; +}; + +struct _DSOUND_IO_DSBUSID { + DWORD busid[1]; +}; + +struct _DSOUND_IO_3D { + GUID guid3DAlgorithm; + DS3DBUFFER ds3d; +}; + +struct _DSOUND_IO_DXDMO_HEADER { + DWORD dwEffectFlags; + GUID guidDSFXClass; + GUID guidReserved; + GUID guidSendBuffer; + DWORD dwReserved; +}; + +struct _DSOUND_IO_DXDMO_DATA { + DWORD data[1]; +}; + +#ifdef __cplusplus +} +#endif + +#include + +#endif /* __WINE_DMUSIC_FILEFORMATS_H */ diff --git a/reactos/include/dxsdk/dmusici.h b/reactos/include/dxsdk/dmusici.h new file mode 100644 index 00000000000..82a137b1fed --- /dev/null +++ b/reactos/include/dxsdk/dmusici.h @@ -0,0 +1,1738 @@ +/* + * DirectMusic Performance API + * + * Copyright (C) 2003-2004 Rok Mandeljc + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_DMUSIC_PERFORMANCE_H +#define __WINE_DMUSIC_PERFORMANCE_H + +#ifndef __WINESRC__ +#include +#else +#include /* VARIANT */ +#endif /* __WINESRC__ */ + +#define COM_NO_WINDOWS_H +#include +#include +#include +#include +#include + +#ifdef WINE_NO_UNICODE_MACROS +#undef AddPort +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/***************************************************************************** + * Predeclare the interfaces + */ +/* CLSIDs */ +DEFINE_GUID(CLSID_DirectMusicAudioPathConfig, 0xee0b9ca0,0xa81e,0x11d3,0x9b,0xd1,0x00,0x80,0xc7,0x15,0x0a,0x74); +DEFINE_GUID(CLSID_DirectMusicBand, 0x79ba9e00,0xb6ee,0x11d1,0x86,0xbe,0x00,0xc0,0x4f,0xbf,0x8f,0xef); +DEFINE_GUID(CLSID_DirectMusicChordMap, 0xd2ac288f,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicComposer, 0xd2ac2890,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicContainer, 0x9301e380,0x1f22,0x11d3,0x82,0x26,0xd2,0xfa,0x76,0x25,0x5d,0x47); +DEFINE_GUID(CLSID_DirectMusicGraph, 0xd2ac2884,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicLoader, 0xd2ac2892,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicPatternTrack, 0xd2ac2897,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicPerformance, 0xd2ac2881,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicScript, 0x810b5013,0xe88d,0x11d2,0x8b,0xc1,0x00,0x60,0x08,0x93,0xb1,0xb6); +DEFINE_GUID(CLSID_DirectMusicSegment, 0xd2ac2882,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicSegmentState, 0xd2ac2883,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicStyle, 0xd2ac288a,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectSoundWave, 0x8a667154,0xf9cb,0x11d2,0xad,0x8a,0x00,0x60,0xb0,0x57,0x5a,0xbc); +/* MS doesn't support this in DX 9.0 and newer... but there's no harm in keeping it around */ +DEFINE_GUID(CLSID_DirectMusicSong, 0xaed5f0a5,0xd972,0x483d,0xa3,0x84,0x64,0x9d,0xfe,0xb9,0xc1,0x81); +/* these CLSIDs aren't officially declared in any dmusic header, but are used by wine's regsvr implementations*/ +DEFINE_GUID(CLSID_DirectMusicSynthSink, 0xaec17ce3,0xa514,0x11d1,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6); +DEFINE_GUID(CLSID_DirectMusicSection, 0x3f037241,0x414e,0x11d1,0xa7,0xce,0x00,0xa0,0xc9,0x13,0xf7,0x3c); +DEFINE_GUID(CLSID_DirectMusicAuditionTrack, 0xd2ac2897,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(CLSID_DirectMusicSegTriggerTrack, 0xbae4d665,0x4ea1,0x11d3,0x8b,0xda,0x00,0x60,0x08,0x93,0xb1,0xb6); +DEFINE_GUID(CLSID_DirectMusicAudioPath, 0xee0b9ca0,0xa81e,0x11d3,0x9b,0xd1,0x00,0x80,0xc7,0x15,0x0a,0x74); +DEFINE_GUID(CLSID_DirectMusicTemplate, 0xd30bcc65,0x60e8,0x11d1,0xa7,0xce,0x00,0xa0,0xc9,0x13,0xf7,0x3c); +DEFINE_GUID(CLSID_DirectMusicScriptAutoImpSegment, 0x4062c116,0x0270,0x11d3,0x8b,0xcb,0x00,0x60,0x08,0x93,0xb1,0xb6); +DEFINE_GUID(CLSID_AudioVBScript, 0x4ee17959,0x931e,0x49e4,0xa2,0xc6,0x97,0x7e,0xcf,0x36,0x28,0xf3); +DEFINE_GUID(CLSID_DirectMusicScriptAutoImpPerformance, 0xa861c6e2,0xfcfc,0x11d2,0x8b,0xc9,0x00,0x60,0x08,0x93,0xb1,0xb6); +DEFINE_GUID(CLSID_DirectMusicScriptSourceCodeLoader, 0xc70eb77f,0xefd4,0x4678,0xa2,0x7b,0xbf,0x16,0x48,0xf3,0x0d,0x04); +DEFINE_GUID(CLSID_DirectMusicScriptAutoImpSegmentState, 0xebf2320a,0x2502,0x11d3,0x8b,0xd1,0x00,0x60,0x08,0x93,0xb1,0xb6); +DEFINE_GUID(CLSID_DirectMusicScriptAutoImpAudioPathConfig, 0x1cebde3e,0x6b91,0x484a,0xaf,0x48,0x5e,0x4f,0x4e,0xd6,0xb1,0xe1); +DEFINE_GUID(CLSID_DirectMusicScriptAutoImpAudioPath, 0x2c5f9b72,0x7148,0x4d97,0xbf,0xc9,0x68,0xa0,0xe0,0x76,0xbe,0xbd); +DEFINE_GUID(CLSID_DirectMusicScriptAutoImpSong, 0xa16f1761,0xb6d8,0x42eb,0x8d,0x57,0x4a,0x44,0xfe,0xdd,0x3b,0xd2); + +/* IIDs */ +DEFINE_GUID(IID_IDirectMusicAudioPath, 0xc87631f5,0x23be,0x4986,0x88,0x36,0x05,0x83,0x2f,0xcc,0x48,0xf9); +DEFINE_GUID(IID_IDirectMusicBand, 0xd2ac28c0,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicChordMap, 0xd2ac28be,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicComposer, 0xd2ac28bf,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicContainer, 0x9301e386,0x1f22,0x11d3,0x82,0x26,0xd2,0xfa,0x76,0x25,0x5d,0x47); +DEFINE_GUID(IID_IDirectMusicGetLoader, 0x68a04844,0xd13d,0x11d1,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6); +DEFINE_GUID(IID_IDirectMusicGraph, 0x2befc277,0x5497,0x11d2,0xbc,0xcb,0x00,0xa0,0xc9,0x22,0xe6,0xeb); +DEFINE_GUID(IID_IDirectMusicLoader, 0x2ffaaca2,0x5dca,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6); +DEFINE_GUID(IID_IDirectMusicLoader8, 0x19e7c08c,0x0a44,0x4e6a,0xa1,0x16,0x59,0x5a,0x7c,0xd5,0xde,0x8c); +DEFINE_GUID(IID_IDirectMusicObject, 0xd2ac28b5,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicPatternTrack, 0x51c22e10,0xb49f,0x46fc,0xbe,0xc2,0xe6,0x28,0x8f,0xb9,0xed,0xe6); +DEFINE_GUID(IID_IDirectMusicPerformance, 0x07d43d03,0x6523,0x11d2,0x87,0x1d,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicPerformance2, 0x6fc2cae0,0xbc78,0x11d2,0xaf,0xa6,0x00,0xaa,0x00,0x24,0xd8,0xb6); +DEFINE_GUID(IID_IDirectMusicPerformance8, 0x679c4137,0xc62e,0x4147,0xb2,0xb4,0x9d,0x56,0x9a,0xcb,0x25,0x4c); +DEFINE_GUID(IID_IDirectMusicScript, 0x2252373a,0x5814,0x489b,0x82,0x09,0x31,0xfe,0xde,0xba,0xf1,0x37); +DEFINE_GUID(IID_IDirectMusicSegment, 0xf96029a2,0x4282,0x11d2,0x87,0x17,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicSegment2, 0xd38894d1,0xc052,0x11d2,0x87,0x2f,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicSegment8, 0xc6784488,0x41a3,0x418f,0xaa,0x15,0xb3,0x50,0x93,0xba,0x42,0xd4); +DEFINE_GUID(IID_IDirectMusicSegmentState, 0xa3afdcc7,0xd3ee,0x11d1,0xbc,0x8d,0x00,0xa0,0xc9,0x22,0xe6,0xeb); +DEFINE_GUID(IID_IDirectMusicSegmentState8, 0xa50e4730,0x0ae4,0x48a7,0x98,0x39,0xbc,0x04,0xbf,0xe0,0x77,0x72); +DEFINE_GUID(IID_IDirectMusicStyle, 0xd2ac28bd,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(IID_IDirectMusicStyle8, 0xfd24ad8a,0xa260,0x453d,0xbf,0x50,0x6f,0x93,0x84,0xf7,0x09,0x85); + +/* IIDs of unchanged interfaces */ +#define IID_IDirectMusicAudioPath8 IID_IDirectMusicAudioPath +#define IID_IDirectMusicBand8 IID_IDirectMusicBand +#define IID_IDirectMusicChordMap8 IID_IDirectMusicChordMap +#define IID_IDirectMusicComposer8 IID_IDirectMusicComposer +#define IID_IDirectMusicContainer8 IID_IDirectMusicContainer +#define IID_IDirectMusicGetLoader8 IID_IDirectMusicGetLoader +#define IID_IDirectMusicGraph8 IID_IDirectMusicGraph +#define IID_IDirectMusicObject8 IID_IDirectMusicObject +#define IID_IDirectMusicPatternTrack8 IID_IDirectMusicPatternTrack +#define IID_IDirectMusicScript8 IID_IDirectMusicScript + +/* typedef definitions */ +typedef struct IDirectMusicBand *LPDIRECTMUSICBAND; +typedef struct IDirectMusicBand IDirectMusicBand8, *LPDIRECTMUSICBAND8; +typedef struct IDirectMusicObject *LPDIRECTMUSICOBJECT; +typedef struct IDirectMusicObject IDirectMusicObject8, *LPDIRECTMUSICOBJECT8; +typedef struct IDirectMusicLoader *LPDIRECTMUSICLOADER; +typedef struct IDirectMusicLoader8 *LPDIRECTMUSICLOADER8; +typedef struct IDirectMusicGetLoader *LPDIRECTMUSICGETLOADER; +typedef struct IDirectMusicGetLoader IDirectMusicGetLoader8, *LPDIRECTMUSICGETLOADER8; +typedef struct IDirectMusicAudioPath *LPDIRECTMUSICAUDIOPATH; +typedef struct IDirectMusicAudioPath IDirectMusicAudioPath8, *LPDIRECTMUSICAUDIOPATH8; +typedef struct IDirectMusicStyle *LPDIRECTMUSICSTYLE; +typedef struct IDirectMusicStyle8 *LPDIRECTMUSICSTYLE8; +typedef struct IDirectMusicChordMap *LPDIRECTMUSICCHORDMAP; +typedef struct IDirectMusicChordMap IDirectMusicChordMap8, *LPDIRECTMUSICCHORDMAP8; +typedef struct IDirectMusicComposer *LPDIRECTMUSICCOMPOSER; +typedef struct IDirectMusicComposer IDirectMusicComposer8, *LPDIRECTMUSICCOMPOSER8; +typedef struct IDirectMusicPatternTrack *LPDIRECTMUSICPATTERNTRACK; +typedef struct IDirectMusicPatternTrack IDirectMusicPatternTrack8, *LPDIRECTMUSICPATTERNTRACK8; +typedef struct IDirectMusicScript *LPDIRECTMUSICSCRIPT; +typedef struct IDirectMusicScript IDirectMusicScript8, *LPDIRECTMUSICSCRIPT8; +typedef struct IDirectMusicContainer *LPDIRECTMUSICCONTAINER; +typedef struct IDirectMusicContainer IDirectMusicContainer8, *LPDIRECTMUSICCONTAINER8; + +/* RPC declarations */ +typedef struct IDirectMusicBand *LPDMUS_BAND; +typedef struct IDirectMusicLoader *LPDMUS_LOADER; +typedef struct IDirectMusicObject *LPDMUS_OBJECT; + +/* GUIDs - all types loader */ +DEFINE_GUID(GUID_DirectMusicAllTypes, 0xd2ac2893,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +/* GUIDs - notification */ +DEFINE_GUID(GUID_NOTIFICATION_CHORD, 0xd2ac289b,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_NOTIFICATION_COMMAND, 0xd2ac289c,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_NOTIFICATION_MEASUREANDBEAT, 0xd2ac289a,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_NOTIFICATION_PERFORMANCE, 0x81f75bc5,0x4e5d,0x11d2,0xbc,0xc7,0x00,0xa0,0xc9,0x22,0xe6,0xeb); +DEFINE_GUID(GUID_NOTIFICATION_RECOMPOSE, 0xd348372b,0x945b,0x45ae,0xa5,0x22,0x45,0x0f,0x12,0x5b,0x84,0xa5); +DEFINE_GUID(GUID_NOTIFICATION_SEGMENT, 0xd2ac2899,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +/* GUIDs - param types */ +DEFINE_GUID(GUID_BandParam, 0x02bb1938,0xcb8b,0x11d2,0x8b,0xb9,0x00,0x60,0x08,0x93,0xb1,0xb6); +DEFINE_GUID(GUID_ChordParam, 0xd2ac289e,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_CommandParam, 0xd2ac289d,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_CommandParam2, 0x28f97ef7,0x9538,0x11d2,0x97,0xa9,0x00,0xc0,0x4f,0xa3,0x6e,0x58); +DEFINE_GUID(GUID_CommandParamNext, 0x472afe7a,0x281b,0x11d3,0x81,0x7d,0x00,0xc0,0x4f,0xa3,0x6e,0x58); +DEFINE_GUID(GUID_IDirectMusicBand, 0xd2ac28ac,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_IDirectMusicChordMap, 0xd2ac28ad,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_IDirectMusicStyle, 0xd2ac28a1,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_MuteParam, 0xd2ac28af,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_Play_Marker, 0xd8761a41,0x801a,0x11d3,0x9b,0xd1,0xda,0xf7,0xe1,0xc3,0xd8,0x34); +DEFINE_GUID(GUID_RhythmParam, 0xd2ac289f,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_TempoParam, 0xd2ac28a5,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_TimeSignature, 0xd2ac28a4,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_Valid_Start_Time, 0x7f6b1760,0x1fdb,0x11d3,0x82,0x26,0x44,0x45,0x53,0x54,0x00,0x00); +/* GUIDs - param setting */ +DEFINE_GUID(GUID_Clear_All_Bands, 0xd2ac28ab,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_ConnectToDLSCollection, 0x1db1ae6b,0xe92e,0x11d1,0xa8,0xc5,0x00,0xc0,0x4f,0xa3,0x72,0x6e); +DEFINE_GUID(GUID_Disable_Auto_Download, 0xd2ac28aa,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_DisableTempo, 0x45fc707d,0x1db4,0x11d2,0xbc,0xac,0x00,0xa0,0xc9,0x22,0xe6,0xeb); +DEFINE_GUID(GUID_DisableTimeSig, 0x45fc707b,0x1db4,0x11d2,0xbc,0xac,0x00,0xa0,0xc9,0x22,0xe6,0xeb); +DEFINE_GUID(GUID_Download, 0xd2ac28a7,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_DownloadToAudioPath, 0x9f2c0341,0xc5c4,0x11d3,0x9b,0xd1,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_Enable_Auto_Download, 0xd2ac28a9,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_EnableTempo, 0x45fc707e,0x1db4,0x11d2,0xbc,0xac,0x00,0xa0,0xc9,0x22,0xe6,0xeb); +DEFINE_GUID(GUID_EnableTimeSig, 0x45fc707c,0x1db4,0x11d2,0xbc,0xac,0x00,0xa0,0xc9,0x22,0xe6,0xeb); +#define GUID_IgnoreBankSelectForGM GUID_StandardMIDIFile +DEFINE_GUID(GUID_SeedVariations, 0x65b76fa5,0xff37,0x11d2,0x81,0x4e,0x00,0xc0,0x4f,0xa3,0x6e,0x58); +DEFINE_GUID(GUID_StandardMIDIFile, 0x06621075,0xe92e,0x11d1,0xa8,0xc5,0x00,0xc0,0x4f,0xa3,0x72,0x6e); +DEFINE_GUID(GUID_Unload, 0xd2ac28a8,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_UnloadFromAudioPath, 0x9f2c0342,0xc5c4,0x11d3,0x9b,0xd1,0x44,0x45,0x53,0x54,0x00,0x00); +DEFINE_GUID(GUID_Variations, 0x11f72cce,0x26e6,0x4ecd,0xaf,0x2e,0xd6,0x68,0xe6,0x67,0x07,0xd8); +/* GUIDs - global data */ +DEFINE_GUID(GUID_PerfMasterTempo, 0xd2ac28b0,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_PerfMasterVolume, 0xd2ac28b1,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_PerfMasterGrooveLevel, 0xd2ac28b2,0xb39b,0x11d1,0x87,0x04,0x00,0x60,0x08,0x93,0xb1,0xbd); +DEFINE_GUID(GUID_PerfAutoDownload, 0xfb09565b,0x3631,0x11d2,0xbc,0xb8,0x00,0xa0,0xc9,0x22,0xe6,0xeb); +/* GUID - default DLS collection */ +DEFINE_GUID(GUID_DefaultGMCollection, 0xf17e8673,0xc3b4,0x11d1,0x87,0x0b,0x00,0x60,0x08,0x93,0xb1,0xbd); +/* GUID - default synthesizer */ +DEFINE_GUID(GUID_Synth_Default, 0x26bb9432,0x45fe,0x48d3,0xa3,0x75,0x24,0x72,0xc5,0xe3,0xe7,0x86); +/* GUIDs - define default buffer configuration */ +DEFINE_GUID(GUID_Buffer_Reverb, 0x186cc541,0xdb29,0x11d3,0x9b,0xd1,0x00,0x80,0xc7,0x15,0x0a,0x74); +DEFINE_GUID(GUID_Buffer_EnvReverb, 0x186cc542,0xdb29,0x11d3,0x9b,0xd1,0x00,0x80,0xc7,0x15,0x0a,0x74); +DEFINE_GUID(GUID_Buffer_Stereo, 0x186cc545,0xdb29,0x11d3,0x9b,0xd1,0x00,0x80,0xc7,0x15,0x0a,0x74); +DEFINE_GUID(GUID_Buffer_3D_Dry, 0x186cc546,0xdb29,0x11d3,0x9b,0xd1,0x00,0x80,0xc7,0x15,0x0a,0x74); +DEFINE_GUID(GUID_Buffer_Mono, 0x186cc547,0xdb29,0x11d3,0x9b,0xd1,0x00,0x80,0xc7,0x15,0x0a,0x74); + + +/***************************************************************************** + * Typedef definitions + */ +typedef WORD TRANSITION_TYPE, *LPTRANSITION_TYPE; +/* + * typedef __int64 REFERENCE_TIME, *LPREFERENCE_TIME; + * typedef LONG MUSIC_TIME, *LPMUSIC_TIME; + */ + + +/***************************************************************************** + * Flags + */ +#define DMUS_APATH_SHARED_STEREOPLUSREVERB 0x1 +#define DMUS_APATH_DYNAMIC_3D 0x6 +#define DMUS_APATH_DYNAMIC_MONO 0x7 +#define DMUS_APATH_DYNAMIC_STEREO 0x8 + +#define DMUS_AUDIOF_3D 0x01 +#define DMUS_AUDIOF_ENVIRON 0x02 +#define DMUS_AUDIOF_EAX 0x04 +#define DMUS_AUDIOF_DMOS 0x08 +#define DMUS_AUDIOF_STREAMING 0x10 +#define DMUS_AUDIOF_BUFFERS 0x20 +#define DMUS_AUDIOF_ALL 0x3F + +#define DMUS_AUDIOPARAMS_FEATURES 0x1 +#define DMUS_AUDIOPARAMS_VOICES 0x2 +#define DMUS_AUDIOPARAMS_SAMPLERATE 0x4 +#define DMUS_AUDIOPARAMS_DEFAULTSYNTH 0x8 + +#define DMUS_CURVET_PBCURVE 0x03 +#define DMUS_CURVET_CCCURVE 0x04 +#define DMUS_CURVET_MATCURVE 0x05 +#define DMUS_CURVET_PATCURVE 0x06 +#define DMUS_CURVET_RPNCURVE 0x07 +#define DMUS_CURVET_NRPNCURVE 0x08 + +#define DMUS_MASTERTEMPO_MAX 100.0f +#define DMUS_MASTERTEMPO_MIN 0.01f + +#define DMUS_MAX_NAME 0x40 +#define DMUS_MAX_CATEGORY 0x40 +#define DMUS_MAX_FILENAME MAX_PATH + +#define DMUS_MAXSUBCHORD 0x8 + +#define DMUS_NOTIFICATION_SEGSTART 0x0 +#define DMUS_NOTIFICATION_SEGEND 0x1 +#define DMUS_NOTIFICATION_SEGALMOSTEND 0x2 +#define DMUS_NOTIFICATION_SEGLOOP 0x3 +#define DMUS_NOTIFICATION_SEGABORT 0x4 +#define DMUS_NOTIFICATION_MUSICSTARTED 0x0 +#define DMUS_NOTIFICATION_MUSICSTOPPED 0x1 +#define DMUS_NOTIFICATION_MUSICALMOSTEND 0x2 +#define DMUS_NOTIFICATION_MEASUREBEAT 0x0 +#define DMUS_NOTIFICATION_CHORD 0x0 +#define DMUS_NOTIFICATION_GROOVE 0x0 +#define DMUS_NOTIFICATION_EMBELLISHMENT 0x1 +#define DMUS_NOTIFICATION_RECOMPOSE 0x0 + +#define DMUS_OBJ_OBJECT 0x001 +#define DMUS_OBJ_CLASS 0x002 +#define DMUS_OBJ_NAME 0x004 +#define DMUS_OBJ_CATEGORY 0x008 +#define DMUS_OBJ_FILENAME 0x010 +#define DMUS_OBJ_FULLPATH 0x020 +#define DMUS_OBJ_URL 0x040 +#define DMUS_OBJ_VERSION 0x080 +#define DMUS_OBJ_DATE 0x100 +#define DMUS_OBJ_LOADED 0x200 +#define DMUS_OBJ_MEMORY 0x400 +#define DMUS_OBJ_STREAM 0x800 + +#define DMUS_PATH_SEGMENT 0x1000 +#define DMUS_PATH_SEGMENT_TRACK 0x1100 +#define DMUS_PATH_SEGMENT_GRAPH 0x1200 +#define DMUS_PATH_SEGMENT_TOOL 0x1300 +#define DMUS_PATH_AUDIOPATH 0x2000 +#define DMUS_PATH_AUDIOPATH_GRAPH 0x2200 +#define DMUS_PATH_AUDIOPATH_TOOL 0x2300 +#define DMUS_PATH_PERFORMANCE 0x3000 +#define DMUS_PATH_PERFORMANCE_GRAPH 0x3200 +#define DMUS_PATH_PERFORMANCE_TOOL 0x3300 +#define DMUS_PATH_PORT 0x4000 +#define DMUS_PATH_BUFFER 0x6000 +#define DMUS_PATH_BUFFER_DMO 0x6100 +#define DMUS_PATH_MIXIN_BUFFER 0x7000 +#define DMUS_PATH_MIXIN_BUFFER_DMO 0x7100 +#define DMUS_PATH_PRIMARY_BUFFER 0x8000 + +#define DMUS_PCHANNEL_BROADCAST_PERFORMANCE 0xFFFFFFFF +#define DMUS_PCHANNEL_BROADCAST_AUDIOPATH 0xFFFFFFFE +#define DMUS_PCHANNEL_BROADCAST_SEGMENT 0xFFFFFFFD +#define DMUS_PCHANNEL_BROADCAST_GROUPS 0xFFFFFFFC +#define DMUS_PCHANNEL_ALL 0xFFFFFFFB + +#define DMUS_PLAYMODE_FIXED 0x0 +#define DMUS_PLAYMODE_FIXEDTOKEY DMUS_PLAYMODE_KEY_ROOT +#define DMUS_PLAYMODE_FIXEDTOCHORD DMUS_PLAYMODE_CHORD_ROOT +#define DMUS_PLAYMODE_PEDALPOINT (DMUS_PLAYMODE_KEY_ROOT | DMUS_PLAYMODE_SCALE_INTERVALS) +#define DMUS_PLAYMODE_MELODIC (DMUS_PLAYMODE_CHORD_ROOT | DMUS_PLAYMODE_SCALE_INTERVALS) +#define DMUS_PLAYMODE_NORMALCHORD (DMUS_PLAYMODE_CHORD_ROOT | DMUS_PLAYMODE_CHORD_INTERVALS) +#define DMUS_PLAYMODE_ALWAYSPLAY (DMUS_PLAYMODE_MELODIC | DMUS_PLAYMODE_NORMALCHORD) +#define DMUS_PLAYMODE_PEDALPOINTCHORD (DMUS_PLAYMODE_KEY_ROOT | DMUS_PLAYMODE_CHORD_INTERVALS) +#define DMUS_PLAYMODE_PEDALPOINTALWAYS (DMUS_PLAYMODE_PEDALPOINT | DMUS_PLAYMODE_PEDALPOINTCHORD) +#define DMUS_PLAYMODE_PURPLEIZED DMUS_PLAYMODE_ALWAYSPLAY +#define DMUS_PLAYMODE_SCALE_ROOT DMUS_PLAYMODE_KEY_ROOT +#define DMUS_PLAYMODE_FIXEDTOSCALE DMUS_PLAYMODE_FIXEDTOKEY + +#define DMUS_PPQ 768 + +#define DMUS_SEG_REPEAT_INFINITE 0xFFFFFFFF +#define DMUS_SEG_ALLTRACKS 0x80000000 +#define DMUS_SEG_ANYTRACK 0x80000000 + +#define DMUS_TEMPO_MAX 1000 +#define DMUS_TEMPO_MIN 1 + +#define DMUS_TRACKCONFIG_OVERRIDE_ALL 0x00001 +#define DMUS_TRACKCONFIG_OVERRIDE_PRIMARY 0x00002 +#define DMUS_TRACKCONFIG_FALLBACK 0x00004 +#define DMUS_TRACKCONFIG_CONTROL_ENABLED 0x00008 +#define DMUS_TRACKCONFIG_PLAY_ENABLED 0x00010 +#define DMUS_TRACKCONFIG_NOTIFICATION_ENABLED 0x00020 +#define DMUS_TRACKCONFIG_PLAY_CLOCKTIME 0x00040 +#define DMUS_TRACKCONFIG_PLAY_COMPOSE 0x00080 +#define DMUS_TRACKCONFIG_LOOP_COMPOSE 0x00100 +#define DMUS_TRACKCONFIG_COMPOSING 0x00200 +#define DMUS_TRACKCONFIG_TRANS1_FROMSEGSTART 0x00400 +#define DMUS_TRACKCONFIG_TRANS1_FROMSEGCURRENT 0x00800 +#define DMUS_TRACKCONFIG_TRANS1_TOSEGSTART 0x01000 +#define DMUS_TRACKCONFIG_CONTROL_PLAY 0x10000 +#define DMUS_TRACKCONFIG_CONTROL_NOTIFICATION 0x20000 +#define DMUS_TRACKCONFIG_DEFAULT (DMUS_TRACKCONFIG_CONTROL_ENABLED | DMUS_TRACKCONFIG_PLAY_ENABLED | DMUS_TRACKCONFIG_NOTIFICATION_ENABLED) + +#define DMUS_WAVEF_OFF 0x01 +#define DMUS_WAVEF_STREAMING 0x02 +#define DMUS_WAVEF_NOINVALIDATE 0x04 +#define DMUS_WAVEF_NOPREROLL 0x08 +#define DMUS_WAVEF_IGNORELOOPS 0x20 + +#define DMUSB_LOADED 0x1 +#define DMUSB_DEFAULT 0x2 + +#define MT_MIN 0x80000000 +#define MT_MAX 0x7FFFFFFF + + +/***************************************************************************** + * Definitions + */ +#define DMUS_PMSG_PART \ + DWORD dwSize; \ + REFERENCE_TIME rtTime; \ + MUSIC_TIME mtTime; \ + DWORD dwFlags; \ + DWORD dwPChannel; \ + DWORD dwVirtualTrackID; \ + IDirectMusicTool* pTool; \ + struct IDirectMusicGraph* pGraph; \ + DWORD dwType; \ + DWORD dwVoiceID; \ + DWORD dwGroupID; \ + IUnknown* punkUser; + + +/***************************************************************************** + * Enumerations + */ +/* typedef definitions */ +typedef enum enumDMUS_STYLET_TYPES DMUS_STYLET_TYPES; +typedef enum enumDMUS_COMMANDT_TYPES DMUS_COMMANDT_TYPES; +typedef enum enumDMUS_SHAPET_TYPES DMUS_SHAPET_TYPES; +typedef enum enumDMUS_COMPOSEF_FLAGS DMUS_COMPOSEF_FLAGS; +typedef enum enumDMUS_PMSGF_FLAGS DMUS_PMSGF_FLAGS; +typedef enum enumDMUS_PMSGT_TYPES DMUS_PMSGT_TYPES; +typedef enum enumDMUS_SEGF_FLAGS DMUS_SEGF_FLAGS; +typedef enum enumDMUS_TIME_RESOLVE_FLAGS DMUS_TIME_RESOLVE_FLAGS; +typedef enum enumDMUS_CHORDKEYF_FLAGS DMUS_CHORDKEYF_FLAGS; +typedef enum enumDMUS_NOTEF_FLAGS DMUS_NOTEF_FLAGS; +typedef enum enumDMUS_PLAYMODE_FLAGS DMUS_PLAYMODE_FLAGS; +typedef enum enumDMUS_CURVE_FLAGS DMUS_CURVE_FLAGS; + + + +/* actual enumerations */ +enum enumDMUS_STYLET_TYPES { + DMUS_STYLET_PATTERN = 0x0, + DMUS_STYLET_MOTIF = 0x1, +}; + +enum enumDMUS_COMMANDT_TYPES { + DMUS_COMMANDT_GROOVE = 0x0, + DMUS_COMMANDT_FILL = 0x1, + DMUS_COMMANDT_INTRO = 0x2, + DMUS_COMMANDT_BREAK = 0x3, + DMUS_COMMANDT_END = 0x4, + DMUS_COMMANDT_ENDANDINTRO = 0x5 +}; + +enum enumDMUS_SHAPET_TYPES { + DMUS_SHAPET_FALLING = 0x0, + DMUS_SHAPET_LEVEL = 0x1, + DMUS_SHAPET_LOOPABLE = 0x2, + DMUS_SHAPET_LOUD = 0x3, + DMUS_SHAPET_QUIET = 0x4, + DMUS_SHAPET_PEAKING = 0x5, + DMUS_SHAPET_RANDOM = 0x6, + DMUS_SHAPET_RISING = 0x7, + DMUS_SHAPET_SONG = 0x8 +}; + +enum enumDMUS_COMPOSEF_FLAGS { + DMUS_COMPOSEF_NONE = 0x000000, + DMUS_COMPOSEF_ALIGN = 0x000001, + DMUS_COMPOSEF_OVERLAP = 0x000002, + DMUS_COMPOSEF_IMMEDIATE = 0x000004, + DMUS_COMPOSEF_GRID = 0x000008, + DMUS_COMPOSEF_BEAT = 0x000010, + DMUS_COMPOSEF_MEASURE = 0x000020, + DMUS_COMPOSEF_AFTERPREPARETIME = 0x000040, + DMUS_COMPOSEF_VALID_START_BEAT = 0x000080, + DMUS_COMPOSEF_VALID_START_GRID = 0x000100, + DMUS_COMPOSEF_VALID_START_TICK = 0x000200, + DMUS_COMPOSEF_SEGMENTEND = 0x000400, + DMUS_COMPOSEF_MARKER = 0x000800, + DMUS_COMPOSEF_MODULATE = 0x001000, + DMUS_COMPOSEF_LONG = 0x002000, + DMUS_COMPOSEF_ENTIRE_TRANSITION = 0x004000, + DMUS_COMPOSEF_1BAR_TRANSITION = 0x008000, + DMUS_COMPOSEF_ENTIRE_ADDITION = 0x010000, + DMUS_COMPOSEF_1BAR_ADDITION = 0x020000, + DMUS_COMPOSEF_VALID_START_MEASURE = 0x040000, + DMUS_COMPOSEF_DEFAULT = 0x080000, + DMUS_COMPOSEF_NOINVALIDATE = 0x100000, + DMUS_COMPOSEF_USE_AUDIOPATH = 0x200000, + DMUS_COMPOSEF_INVALIDATE_PRI = 0x400000 +}; + +enum enumDMUS_PMSGF_FLAGS { + DMUS_PMSGF_REFTIME = 1, + DMUS_PMSGF_MUSICTIME = 2, + DMUS_PMSGF_TOOL_IMMEDIATE = 4, + DMUS_PMSGF_TOOL_QUEUE = 8, + DMUS_PMSGF_TOOL_ATTIME = 0x10, + DMUS_PMSGF_TOOL_FLUSH = 0x20, + DMUS_PMSGF_LOCKTOREFTIME = 0x40, + DMUS_PMSGF_DX8 = 0x80 +}; + +enum enumDMUS_PMSGT_TYPES { + DMUS_PMSGT_MIDI = 0x00, + DMUS_PMSGT_NOTE = 0x01, + DMUS_PMSGT_SYSEX = 0x02, + DMUS_PMSGT_NOTIFICATION = 0x03, + DMUS_PMSGT_TEMPO = 0x04, + DMUS_PMSGT_CURVE = 0x05, + DMUS_PMSGT_TIMESIG = 0x06, + DMUS_PMSGT_PATCH = 0x07, + DMUS_PMSGT_TRANSPOSE = 0x08, + DMUS_PMSGT_CHANNEL_PRIORITY = 0x09, + DMUS_PMSGT_STOP = 0x0A, + DMUS_PMSGT_DIRTY = 0x0B, + DMUS_PMSGT_WAVE = 0x0C, + DMUS_PMSGT_LYRIC = 0x0D, + DMUS_PMSGT_SCRIPTLYRIC = 0x0E, + DMUS_PMSGT_USER = 0xFF +}; + +enum enumDMUS_SEGF_FLAGS { + DMUS_SEGF_REFTIME = 0x000040, + DMUS_SEGF_SECONDARY = 0x000080, + DMUS_SEGF_QUEUE = 0x000100, + DMUS_SEGF_CONTROL = 0x000200, + DMUS_SEGF_AFTERPREPARETIME = 0x000400, + DMUS_SEGF_GRID = 0x000800, + DMUS_SEGF_BEAT = 0x001000, + DMUS_SEGF_MEASURE = 0x002000, + DMUS_SEGF_DEFAULT = 0x004000, + DMUS_SEGF_NOINVALIDATE = 0x008000, + DMUS_SEGF_ALIGN = 0x0010000, + DMUS_SEGF_VALID_START_BEAT = 0x0020000, + DMUS_SEGF_VALID_START_GRID = 0x0040000, + DMUS_SEGF_VALID_START_TICK = 0x0080000, + DMUS_SEGF_AUTOTRANSITION = 0x0100000, + DMUS_SEGF_AFTERQUEUETIME = 0x0200000, + DMUS_SEGF_AFTERLATENCYTIME = 0x0400000, + DMUS_SEGF_SEGMENTEND = 0x0800000, + DMUS_SEGF_MARKER = 0x01000000, + DMUS_SEGF_TIMESIG_ALWAYS = 0x02000000, + DMUS_SEGF_USE_AUDIOPATH = 0x04000000, + DMUS_SEGF_VALID_START_MEASURE = 0x08000000, + DMUS_SEGF_INVALIDATE_PRI = 0x10000000 +}; + +enum enumDMUS_TIME_RESOLVE_FLAGS { + DMUS_TIME_RESOLVE_AFTERPREPARETIME = DMUS_SEGF_AFTERPREPARETIME, + DMUS_TIME_RESOLVE_AFTERQUEUETIME = DMUS_SEGF_AFTERQUEUETIME, + DMUS_TIME_RESOLVE_AFTERLATENCYTIME = DMUS_SEGF_AFTERLATENCYTIME, + DMUS_TIME_RESOLVE_GRID = DMUS_SEGF_GRID, + DMUS_TIME_RESOLVE_BEAT = DMUS_SEGF_BEAT, + DMUS_TIME_RESOLVE_MEASURE = DMUS_SEGF_MEASURE, + DMUS_TIME_RESOLVE_MARKER = DMUS_SEGF_MARKER, + DMUS_TIME_RESOLVE_SEGMENTEND = DMUS_SEGF_SEGMENTEND, +}; + +enum enumDMUS_CHORDKEYF_FLAGS { + DMUS_CHORDKEYF_SILENT = 0x1, +}; + +enum enumDMUS_NOTEF_FLAGS { + DMUS_NOTEF_NOTEON = 0x01, + /* DX8 */ + DMUS_NOTEF_NOINVALIDATE = 0x02, + DMUS_NOTEF_NOINVALIDATE_INSCALE = 0x04, + DMUS_NOTEF_NOINVALIDATE_INCHORD = 0x08, + DMUS_NOTEF_REGENERATE = 0x10, +}; + +enum enumDMUS_PLAYMODE_FLAGS { + DMUS_PLAYMODE_KEY_ROOT = 0x01, + DMUS_PLAYMODE_CHORD_ROOT = 0x02, + DMUS_PLAYMODE_SCALE_INTERVALS = 0x04, + DMUS_PLAYMODE_CHORD_INTERVALS = 0x08, + DMUS_PLAYMODE_NONE = 0x10, +}; + +enum enumDMUS_CURVE_FLAGS { + DMUS_CURVE_RESET = 0x1, + DMUS_CURVE_START_FROM_CURRENT = 0x2 +}; + +enum { + DMUS_CURVES_LINEAR = 0x0, + DMUS_CURVES_INSTANT = 0x1, + DMUS_CURVES_EXP = 0x2, + DMUS_CURVES_LOG = 0x3, + DMUS_CURVES_SINE = 0x4 +}; + + +/***************************************************************************** + * Structures + */ +/* typedef definitions */ +/*typedef struct _DMUS_PMSG DMUS_PMSG, *LPDMUS_PMSG; */ +typedef struct _DMUS_AUDIOPARAMS DMUS_AUDIOPARAMS, *LPDMUS_AUDIOPARAMS; +typedef struct _DMUS_SUBCHORD DMUS_SUBCHORD, *LPDMUS_SUBCHORD; +typedef struct _DMUS_CHORD_KEY DMUS_CHORD_KEY, *LPDMUS_CHORD_KEY; +typedef struct _DMUS_NOTE_PMSG DMUS_NOTE_PMSG, *LPDMUS_NOTE_PMSG; +typedef struct _DMUS_MIDI_PMSG DMUS_MIDI_PMSG, *LPDMUS_MIDI_PMSG; +typedef struct _DMUS_PATCH_PMSG DMUS_PATCH_PMSG, *LPDMUS_PATCH_PMSG; +typedef struct _DMUS_TRANSPOSE_PMSG DMUS_TRANSPOSE_PMSG, *LPDMUS_TRANSPOSE_PMSG; +typedef struct _DMUS_CHANNEL_PRIORITY_PMSG DMUS_CHANNEL_PRIORITY_PMSG, *LPDMUS_CHANNEL_PRIORITY_PMSG; +typedef struct _DMUS_TEMPO_PMSG DMUS_TEMPO_PMSG, *LPDMUS_TEMPO_PMSG; +typedef struct _DMUS_SYSEX_PMSG DMUS_SYSEX_PMSG, *LPDMUS_SYSEX_PMSG; +typedef struct _DMUS_CURVE_PMSG DMUS_CURVE_PMSG, *LPDMUS_CURVE_PMSG; +typedef struct _DMUS_TIMESIG_PMSG DMUS_TIMESIG_PMSG, *LPDMUS_TIMESIG_PMSG; +typedef struct _DMUS_NOTIFICATION_PMSG DMUS_NOTIFICATION_PMSG, *LPDMUS_NOTIFICATION_PMSG; +typedef struct _DMUS_WAVE_PMSG DMUS_WAVE_PMSG, *LPDMUS_WAVE_PMSG; +typedef struct _DMUS_LYRIC_PMSG DMUS_LYRIC_PMSG, *LPDMUS_LYRIC_PMSG; +typedef struct _DMUS_VERSION DMUS_VERSION, *LPDMUS_VERSION; +typedef struct _DMUS_TIMESIGNATURE DMUS_TIMESIGNATURE, *LPDMUS_TIMESIGNATURE; +typedef struct _DMUS_VALID_START_PARAM DMUS_VALID_START_PARAM, *LPDMUS_VALID_START_PARAM; +typedef struct _DMUS_PLAY_MARKER_PARAM DMUS_PLAY_MARKER_PARAM, *LPDMUS_PLAY_MARKER_PARAM; +typedef struct _DMUS_OBJECTDESC DMUS_OBJECTDESC, *LPDMUS_OBJECTDESC; +typedef struct _DMUS_SCRIPT_ERRORINFO DMUS_SCRIPT_ERRORINFO, *LPDMUS_SCRIPT_ERRORINFO; +typedef struct _DMUS_COMMAND_PARAM DMUS_COMMAND_PARAM, *LPDMUS_COMMAND_PARAM; +typedef struct _DMUS_COMMAND_PARAM_2 DMUS_COMMAND_PARAM_2, *LPDMUS_COMMAND_PARAM_2; +typedef struct _DMUS_BAND_PARAM DMUS_BAND_PARAM, *LPDMUS_BAND_PARAM; +typedef struct _DMUS_VARIATIONS_PARAM DMUS_VARIATIONS_PARAM, *LPDMUS_VARIATIONS_PARAM; + +/* actual structures */ +struct _DMUS_PMSG { + DMUS_PMSG_PART +}; + +struct _DMUS_AUDIOPARAMS { + DWORD dwSize; + BOOL fInitNow; + DWORD dwValidData; + DWORD dwFeatures; + DWORD dwVoices; + DWORD dwSampleRate; + CLSID clsidDefaultSynth; +}; + +struct _DMUS_SUBCHORD { + DWORD dwChordPattern; + DWORD dwScalePattern; + DWORD dwInversionPoints; + DWORD dwLevels; + BYTE bChordRoot; + BYTE bScaleRoot; +}; + +struct _DMUS_CHORD_KEY { + WCHAR wszName[16]; + WORD wMeasure; + BYTE bBeat; + BYTE bSubChordCount; + DMUS_SUBCHORD SubChordList[DMUS_MAXSUBCHORD]; + DWORD dwScale; + BYTE bKey; + BYTE bFlags; +}; + +struct _DMUS_NOTE_PMSG { + DMUS_PMSG_PART + MUSIC_TIME mtDuration; + WORD wMusicValue; + WORD wMeasure; + short nOffset; + BYTE bBeat; + BYTE bGrid; + BYTE bVelocity; + BYTE bFlags; + BYTE bTimeRange; + BYTE bDurRange; + BYTE bVelRange; + BYTE bPlayModeFlags; + BYTE bSubChordLevel; + BYTE bMidiValue; + char cTranspose; +}; + +struct _DMUS_MIDI_PMSG { + DMUS_PMSG_PART + BYTE bStatus; + BYTE bByte1; + BYTE bByte2; + BYTE bPad[1]; +}; + +struct _DMUS_PATCH_PMSG { + DMUS_PMSG_PART + BYTE byInstrument; + BYTE byMSB; + BYTE byLSB; + BYTE byPad[1]; +}; + +struct _DMUS_TRANSPOSE_PMSG { + DMUS_PMSG_PART + short nTranspose; + /* DX8 */ + WORD wMergeIndex; +}; + +struct _DMUS_CHANNEL_PRIORITY_PMSG { + DMUS_PMSG_PART + DWORD dwChannelPriority; +}; + +struct _DMUS_TEMPO_PMSG { + DMUS_PMSG_PART + double dblTempo; +}; + +struct _DMUS_SYSEX_PMSG { + DMUS_PMSG_PART + DWORD dwLen; + BYTE abData[1]; +}; + +struct _DMUS_CURVE_PMSG { + DMUS_PMSG_PART + MUSIC_TIME mtDuration; + MUSIC_TIME mtOriginalStart; + MUSIC_TIME mtResetDuration; + short nStartValue; + short nEndValue; + short nResetValue; + WORD wMeasure; + short nOffset; + BYTE bBeat; + BYTE bGrid; + BYTE bType; + BYTE bCurveShape; + BYTE bCCData; + BYTE bFlags; + /* DX8 */ + WORD wParamType; + WORD wMergeIndex; +}; + +struct _DMUS_TIMESIG_PMSG { + DMUS_PMSG_PART + BYTE bBeatsPerMeasure; + BYTE bBeat; + WORD wGridsPerBeat; +}; + +struct _DMUS_NOTIFICATION_PMSG { + DMUS_PMSG_PART + GUID guidNotificationType; + DWORD dwNotificationOption; + DWORD dwField1; + DWORD dwField2; +}; + +struct _DMUS_WAVE_PMSG { + DMUS_PMSG_PART + REFERENCE_TIME rtStartOffset; + REFERENCE_TIME rtDuration; + LONG lOffset; + LONG lVolume; + LONG lPitch; + BYTE bFlags; +}; + +struct _DMUS_LYRIC_PMSG { + DMUS_PMSG_PART + WCHAR wszString[1]; +}; + +struct _DMUS_VERSION { + DWORD dwVersionMS; + DWORD dwVersionLS; +}; + +struct _DMUS_TIMESIGNATURE { + MUSIC_TIME mtTime; + BYTE bBeatsPerMeasure; + BYTE bBeat; + WORD wGridsPerBeat; +}; + +struct _DMUS_VALID_START_PARAM { + MUSIC_TIME mtTime; +}; + +struct _DMUS_PLAY_MARKER_PARAM { + MUSIC_TIME mtTime; +}; + +struct _DMUS_OBJECTDESC { + DWORD dwSize; + DWORD dwValidData; + GUID guidObject; + GUID guidClass; + FILETIME ftDate; + DMUS_VERSION vVersion; + WCHAR wszName[DMUS_MAX_NAME]; + WCHAR wszCategory[DMUS_MAX_CATEGORY]; + WCHAR wszFileName[DMUS_MAX_FILENAME]; + LONGLONG llMemLength; + LPBYTE pbMemData; + IStream* pStream; +}; + +struct _DMUS_SCRIPT_ERRORINFO { + DWORD dwSize; + HRESULT hr; + ULONG ulLineNumber; + LONG ichCharPosition; + WCHAR wszSourceFile[DMUS_MAX_FILENAME]; + WCHAR wszSourceComponent[DMUS_MAX_FILENAME]; + WCHAR wszDescription[DMUS_MAX_FILENAME]; + WCHAR wszSourceLineText[DMUS_MAX_FILENAME]; +}; + +struct _DMUS_COMMAND_PARAM { + BYTE bCommand; + BYTE bGrooveLevel; + BYTE bGrooveRange; + BYTE bRepeatMode; +}; + +struct _DMUS_COMMAND_PARAM_2 { + MUSIC_TIME mtTime; + BYTE bCommand; + BYTE bGrooveLevel; + BYTE bGrooveRange; + BYTE bRepeatMode; +}; + +struct _DMUS_BAND_PARAM { + MUSIC_TIME mtTimePhysical; + struct IDirectMusicBand *pBand; +}; + +struct _DMUS_VARIATIONS_PARAM { + DWORD dwPChannelsUsed; + DWORD* padwPChannels; + DWORD* padwVariations; +}; + + +/***************************************************************************** + * IDirectMusicBand interface + */ +#define INTERFACE IDirectMusicBand +DECLARE_INTERFACE_(IDirectMusicBand,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicBand methods ***/ + STDMETHOD(CreateSegment)(THIS_ struct IDirectMusicSegment **ppSegment) PURE; + STDMETHOD(Download)(THIS_ struct IDirectMusicPerformance *pPerformance) PURE; + STDMETHOD(Unload)(THIS_ struct IDirectMusicPerformance *pPerformance) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicBand_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicBand_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicBand_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicBand methods ***/ +#define IDirectMusicBand_CreateSegment(p,a) (p)->lpVtbl->CreateSegment(p,a) +#define IDirectMusicBand_Download(p,a) (p)->lpVtbl->Download(p,a) +#define IDirectMusicBand_Unload(p,a) (p)->lpVtbl->Unload(p,a) +#endif + + +/***************************************************************************** + * IDirectMusicObject interface + */ +#define INTERFACE IDirectMusicObject +DECLARE_INTERFACE_(IDirectMusicObject,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicObject methods ***/ + STDMETHOD(GetDescriptor)(THIS_ LPDMUS_OBJECTDESC pDesc) PURE; + STDMETHOD(SetDescriptor)(THIS_ LPDMUS_OBJECTDESC pDesc) PURE; + STDMETHOD(ParseDescriptor)(THIS_ LPSTREAM pStream, LPDMUS_OBJECTDESC pDesc) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicObject_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicObject_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicObject_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicObject methods ***/ +#define IDirectMusicObject_GetDescriptor(p,a) (p)->lpVtbl->GetDescriptor(p,a) +#define IDirectMusicObject_SetDescriptor(p,a) (p)->lpVtbl->SetDescriptor(p,a) +#define IDirectMusicObject_ParseDescriptor(p,a,b) (p)->lpVtbl->ParseDescriptor(p,a,b) +#endif + + +/***************************************************************************** + * IDirectMusicLoader interface + */ +#define INTERFACE IDirectMusicLoader +DECLARE_INTERFACE_(IDirectMusicLoader,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicLoader methods ***/ + STDMETHOD(_GetObject)(THIS_ LPDMUS_OBJECTDESC pDesc, REFIID riid, LPVOID *ppv) PURE; + STDMETHOD(SetObject)(THIS_ LPDMUS_OBJECTDESC pDesc) PURE; + STDMETHOD(SetSearchDirectory)(THIS_ REFGUID rguidClass, WCHAR *pwzPath, BOOL fClear) PURE; + STDMETHOD(ScanDirectory)(THIS_ REFGUID rguidClass, WCHAR *pwzFileExtension, WCHAR *pwzScanFileName) PURE; + STDMETHOD(CacheObject)(THIS_ IDirectMusicObject *pObject) PURE; + STDMETHOD(ReleaseObject)(THIS_ IDirectMusicObject *pObject) PURE; + STDMETHOD(ClearCache)(THIS_ REFGUID rguidClass) PURE; + STDMETHOD(EnableCache)(THIS_ REFGUID rguidClass, BOOL fEnable) PURE; + STDMETHOD(EnumObject)(THIS_ REFGUID rguidClass, DWORD dwIndex, LPDMUS_OBJECTDESC pDesc) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicLoader_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicLoader_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicLoader_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicLoader methods ***/ +#define IDirectMusicLoader_GetObject(p,a,b,c) (p)->lpVtbl->_GetObject(p,a,b,c) +#define IDirectMusicLoader_SetObject(p,a) (p)->lpVtbl->SetObject(p,a) +#define IDirectMusicLoader_SetSearchDirectory(p,a,b,c) (p)->lpVtbl->SetSearchDirectory(p,a,b,c) +#define IDirectMusicLoader_ScanDirectory(p,a,b,c) (p)->lpVtbl->ScanDirectory(p,a,b,c) +#define IDirectMusicLoader_CacheObject(p,a) (p)->lpVtbl->CacheObject(p,a) +#define IDirectMusicLoader_ReleaseObject(p,a) (p)->lpVtbl->ReleaseObject(p,a) +#define IDirectMusicLoader_ClearCache(p,a) (p)->lpVtbl->ClearCache(p,a) +#define IDirectMusicLoader_EnableCache(p,a,b) (p)->lpVtbl->EnableCache(p,a,b) +#define IDirectMusicLoader_EnumObject(p,a,b,c) (p)->lpVtbl->EnumObject(p,a,b,c) +#endif + + +/***************************************************************************** + * IDirectMusicLoader8 interface + */ +#define INTERFACE IDirectMusicLoader8 +DECLARE_INTERFACE_(IDirectMusicLoader8,IDirectMusicLoader) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicLoader methods ***/ + STDMETHOD(_GetObject)(THIS_ LPDMUS_OBJECTDESC pDesc, REFIID riid, LPVOID *ppv) PURE; + STDMETHOD(SetObject)(THIS_ LPDMUS_OBJECTDESC pDesc) PURE; + STDMETHOD(SetSearchDirectory)(THIS_ REFGUID rguidClass, WCHAR *pwzPath, BOOL fClear) PURE; + STDMETHOD(ScanDirectory)(THIS_ REFGUID rguidClass, WCHAR *pwzFileExtension, WCHAR *pwzScanFileName) PURE; + STDMETHOD(CacheObject)(THIS_ IDirectMusicObject *pObject) PURE; + STDMETHOD(ReleaseObject)(THIS_ IDirectMusicObject *pObject) PURE; + STDMETHOD(ClearCache)(THIS_ REFGUID rguidClass) PURE; + STDMETHOD(EnableCache)(THIS_ REFGUID rguidClass, BOOL fEnable) PURE; + STDMETHOD(EnumObject)(THIS_ REFGUID rguidClass, DWORD dwIndex, LPDMUS_OBJECTDESC pDesc) PURE; + /*** IDirectMusicLoader8 methods ***/ + STDMETHOD_(void,CollectGarbage)(THIS) PURE; + STDMETHOD(ReleaseObjectByUnknown)(THIS_ IUnknown *pObject) PURE; + STDMETHOD(LoadObjectFromFile)(THIS_ REFGUID rguidClassID, REFIID iidInterfaceID, WCHAR *pwzFilePath, void **ppObject) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicLoader8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicLoader8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicLoader8_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicLoader methods ***/ +#define IDirectMusicLoader8_GetObject(p,a,b,c) (p)->lpVtbl->_GetObject(p,a,b,c) +#define IDirectMusicLoader8_SetObject(p,a) (p)->lpVtbl->SetObject(p,a) +#define IDirectMusicLoader8_SetSearchDirectory(p,a,b,c) (p)->lpVtbl->SetSearchDirectory(p,a,b,c) +#define IDirectMusicLoader8_ScanDirectory(p,a,b,c) (p)->lpVtbl->ScanDirectory(p,a,b,c) +#define IDirectMusicLoader8_CacheObject(p,a) (p)->lpVtbl->CacheObject(p,a) +#define IDirectMusicLoader8_ReleaseObject(p,a) (p)->lpVtbl->ReleaseObject(p,a) +#define IDirectMusicLoader8_ClearCache(p,a) (p)->lpVtbl->ClearCache(p,a) +#define IDirectMusicLoader8_EnableCache(p,a,b) (p)->lpVtbl->EnableCache(p,a,b) +#define IDirectMusicLoader8_EnumObject(p,a,b,c) (p)->lpVtbl->EnumObject(p,a,b,c) +/*** IDirectMusicLoader8 methods ***/ +#define IDirectMusicLoader8_CollectGarbage(p) (p)->lpVtbl->CollectGarbage(p) +#define IDirectMusicLoader8_ReleaseObjectByUnknown(p,a) (p)->lpVtbl->ReleaseObjectByUnknown(p,a) +#define IDirectMusicLoader8_LoadObjectFromFile(p,a,b,c,d) (p)->lpVtbl->LoadObjectFromFile(p,a,b,c,d) +#endif + + +/***************************************************************************** + * IDirectMusicGetLoader interface + */ +#define INTERFACE IDirectMusicGetLoader +DECLARE_INTERFACE_(IDirectMusicGetLoader,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicGetLoader methods ***/ + STDMETHOD(GetLoader)(THIS_ IDirectMusicLoader **ppLoader) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicGetLoader_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicGetLoader_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicGetLoader_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicGetLoader methods ***/ +#define IDirectMusicGetLoader_GetLoader(p,a) (p)->lpVtbl->GetLoader(p,a) +#endif + + +/***************************************************************************** + * IDirectMusicSegment interface + */ +#define INTERFACE IDirectMusicSegment +DECLARE_INTERFACE_(IDirectMusicSegment,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicSegment methods ***/ + STDMETHOD(GetLength)(THIS_ MUSIC_TIME *pmtLength) PURE; + STDMETHOD(SetLength)(THIS_ MUSIC_TIME mtLength) PURE; + STDMETHOD(GetRepeats)(THIS_ DWORD *pdwRepeats) PURE; + STDMETHOD(SetRepeats)(THIS_ DWORD dwRepeats) PURE; + STDMETHOD(GetDefaultResolution)(THIS_ DWORD *pdwResolution) PURE; + STDMETHOD(SetDefaultResolution)(THIS_ DWORD dwResolution) PURE; + STDMETHOD(GetTrack)(THIS_ REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, IDirectMusicTrack **ppTrack) PURE; + STDMETHOD(GetTrackGroup)(THIS_ IDirectMusicTrack *pTrack, DWORD *pdwGroupBits) PURE; + STDMETHOD(InsertTrack)(THIS_ IDirectMusicTrack *pTrack, DWORD dwGroupBits) PURE; + STDMETHOD(RemoveTrack)(THIS_ IDirectMusicTrack *pTrack) PURE; + STDMETHOD(InitPlay)(THIS_ struct IDirectMusicSegmentState **ppSegState, struct IDirectMusicPerformance *pPerformance, DWORD dwFlags) PURE; + STDMETHOD(GetGraph)(THIS_ struct IDirectMusicGraph **ppGraph) PURE; + STDMETHOD(SetGraph)(THIS_ struct IDirectMusicGraph *pGraph) PURE; + STDMETHOD(AddNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(RemoveNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(GetParam)(THIS_ REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) PURE; + STDMETHOD(SetParam)(THIS_ REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, void *pParam) PURE; + STDMETHOD(Clone)(THIS_ MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicSegment **ppSegment) PURE; + STDMETHOD(SetStartPoint)(THIS_ MUSIC_TIME mtStart) PURE; + STDMETHOD(GetStartPoint)(THIS_ MUSIC_TIME *pmtStart) PURE; + STDMETHOD(SetLoopPoints)(THIS_ MUSIC_TIME mtStart, MUSIC_TIME mtEnd) PURE; + STDMETHOD(GetLoopPoints)(THIS_ MUSIC_TIME *pmtStart, MUSIC_TIME *pmtEnd) PURE; + STDMETHOD(SetPChannelsUsed)(THIS_ DWORD dwNumPChannels, DWORD *paPChannels) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicSegment_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicSegment_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicSegment_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicSegment methods ***/ +#define IDirectMusicSegment_GetLength(p,a) (p)->lpVtbl->GetLength(p,a) +#define IDirectMusicSegment_SetLength(p,a) (p)->lpVtbl->SetLength(p,a) +#define IDirectMusicSegment_GetRepeats(p,a) (p)->lpVtbl->GetRepeats(p,a) +#define IDirectMusicSegment_SetRepeats(p,a) (p)->lpVtbl->SetRepeats(p,a) +#define IDirectMusicSegment_GetDefaultResolution(p,a) (p)->lpVtbl->GetDefaultResolution(p,a) +#define IDirectMusicSegment_SetDefaultResolution(p,a) (p)->lpVtbl->SetDefaultResolution(p,a) +#define IDirectMusicSegment_GetTrack(p,a,b,c,d) (p)->lpVtbl->GetTrack(p,a,b,c,d) +#define IDirectMusicSegment_GetTrackGroup(p,a,b) (p)->lpVtbl->GetTrackGroup(p,a,b) +#define IDirectMusicSegment_InsertTrack(p,a,b) (p)->lpVtbl->InsertTrack(p,a,b) +#define IDirectMusicSegment_RemoveTrack(p,a) (p)->lpVtbl->RemoveTrack(p,a) +#define IDirectMusicSegment_InitPlay(p,a,b,c) (p)->lpVtbl->InitPlay(p,a,b,c) +#define IDirectMusicSegment_GetGraph(p,a) (p)->lpVtbl->GetGraph(p,a) +#define IDirectMusicSegment_SetGraph(p,a) (p)->lpVtbl->SetGraph(p,a) +#define IDirectMusicSegment_AddNotificationType(p,a) (p)->lpVtbl->AddNotificationType(p,a) +#define IDirectMusicSegment_RemoveNotificationType(p,a) (p)->lpVtbl->RemoveNotificationType(p,a) +#define IDirectMusicSegment_GetParam(p,a,b,c,d,e,f) (p)->lpVtbl->GetParam(p,a,b,c,d,e,f) +#define IDirectMusicSegment_SetParam(p,a,b,c,d,e) (p)->lpVtbl->SetParam(p,a,b,c,d,e) +#define IDirectMusicSegment_Clone(p,a,b,c) (p)->lpVtbl->Clone(p,a,b,c) +#define IDirectMusicSegment_SetStartPoint(p,a) (p)->lpVtbl->SetStartPoint(p,a) +#define IDirectMusicSegment_GetStartPoint(p,a) (p)->lpVtbl->GetStartPoint(p,a) +#define IDirectMusicSegment_SetLoopPoints(p,a,b) (p)->lpVtbl->SetLoopPoints(p,a,b) +#define IDirectMusicSegment_GetLoopPoints(p,a,b) (p)->lpVtbl->GetLoopPoints(p,a,b) +#define IDirectMusicSegment_SetPChannelsUsed(p,a,b) (p)->lpVtbl->SetPChannelsUsed(p,a,b) +#endif + + +/***************************************************************************** + * IDirectMusicSegment8 interface + */ +#define INTERFACE IDirectMusicSegment8 +DECLARE_INTERFACE_(IDirectMusicSegment8,IDirectMusicSegment) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicSegment methods ***/ + STDMETHOD(GetLength)(THIS_ MUSIC_TIME *pmtLength) PURE; + STDMETHOD(SetLength)(THIS_ MUSIC_TIME mtLength) PURE; + STDMETHOD(GetRepeats)(THIS_ DWORD *pdwRepeats) PURE; + STDMETHOD(SetRepeats)(THIS_ DWORD dwRepeats) PURE; + STDMETHOD(GetDefaultResolution)(THIS_ DWORD *pdwResolution) PURE; + STDMETHOD(SetDefaultResolution)(THIS_ DWORD dwResolution) PURE; + STDMETHOD(GetTrack)(THIS_ REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, IDirectMusicTrack **ppTrack) PURE; + STDMETHOD(GetTrackGroup)(THIS_ IDirectMusicTrack *pTrack, DWORD *pdwGroupBits) PURE; + STDMETHOD(InsertTrack)(THIS_ IDirectMusicTrack *pTrack, DWORD dwGroupBits) PURE; + STDMETHOD(RemoveTrack)(THIS_ IDirectMusicTrack *pTrack) PURE; + STDMETHOD(InitPlay)(THIS_ struct IDirectMusicSegmentState **ppSegState, struct IDirectMusicPerformance *pPerformance, DWORD dwFlags) PURE; + STDMETHOD(GetGraph)(THIS_ struct IDirectMusicGraph **ppGraph) PURE; + STDMETHOD(SetGraph)(THIS_ struct IDirectMusicGraph *pGraph) PURE; + STDMETHOD(AddNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(RemoveNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(GetParam)(THIS_ REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) PURE; + STDMETHOD(SetParam)(THIS_ REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, void *pParam) PURE; + STDMETHOD(Clone)(THIS_ MUSIC_TIME mtStart, MUSIC_TIME mtEnd, IDirectMusicSegment **ppSegment) PURE; + STDMETHOD(SetStartPoint)(THIS_ MUSIC_TIME mtStart) PURE; + STDMETHOD(GetStartPoint)(THIS_ MUSIC_TIME *pmtStart) PURE; + STDMETHOD(SetLoopPoints)(THIS_ MUSIC_TIME mtStart, MUSIC_TIME mtEnd) PURE; + STDMETHOD(GetLoopPoints)(THIS_ MUSIC_TIME *pmtStart, MUSIC_TIME *pmtEnd) PURE; + STDMETHOD(SetPChannelsUsed)(THIS_ DWORD dwNumPChannels, DWORD *paPChannels) PURE; + /*** IDirectMusicSegment8 methods ***/ + STDMETHOD(SetTrackConfig)(THIS_ REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff) PURE; + STDMETHOD(GetAudioPathConfig)(THIS_ IUnknown **ppAudioPathConfig) PURE; + STDMETHOD(Compose)(THIS_ MUSIC_TIME mtTime, IDirectMusicSegment *pFromSegment, IDirectMusicSegment *pToSegment, IDirectMusicSegment **ppComposedSegment) PURE; + STDMETHOD(Download)(THIS_ IUnknown *pAudioPath) PURE; + STDMETHOD(Unload)(THIS_ IUnknown *pAudioPath) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicSegment8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicSegment8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicSegment8_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicSegment methods ***/ +#define IDirectMusicSegment8_GetLength(p,a) (p)->lpVtbl->GetLength(p,a) +#define IDirectMusicSegment8_SetLength(p,a) (p)->lpVtbl->SetLength(p,a) +#define IDirectMusicSegment8_GetRepeats(p,a) (p)->lpVtbl->GetRepeats(p,a) +#define IDirectMusicSegment8_SetRepeats(p,a) (p)->lpVtbl->SetRepeats(p,a) +#define IDirectMusicSegment8_GetDefaultResolution(p,a) (p)->lpVtbl->GetDefaultResolution(p,a) +#define IDirectMusicSegment8_SetDefaultResolution(p,a) (p)->lpVtbl->SetDefaultResolution(p,a) +#define IDirectMusicSegment8_GetTrack(p,a,b,c,d) (p)->lpVtbl->GetTrack(p,a,b,c,d) +#define IDirectMusicSegment8_GetTrackGroup(p,a,b) (p)->lpVtbl->GetTrackGroup(p,a,b) +#define IDirectMusicSegment8_InsertTrack(p,a,b) (p)->lpVtbl->InsertTrack(p,a,b) +#define IDirectMusicSegment8_RemoveTrack(p,a) (p)->lpVtbl->RemoveTrack(p,a) +#define IDirectMusicSegment8_InitPlay(p,a,b,c) (p)->lpVtbl->InitPlay(p,a,b,c) +#define IDirectMusicSegment8_GetGraph(p,a) (p)->lpVtbl->GetGraph(p,a) +#define IDirectMusicSegment8_SetGraph(p,a) (p)->lpVtbl->SetGraph(p,a) +#define IDirectMusicSegment8_AddNotificationType(p,a) (p)->lpVtbl->AddNotificationType(p,a) +#define IDirectMusicSegment8_RemoveNotificationType(p,a) (p)->lpVtbl->RemoveNotificationType(p,a) +#define IDirectMusicSegment8_GetParam(p,a,b,c,d,e,f) (p)->lpVtbl->GetParam(p,a,b,c,d,e,f) +#define IDirectMusicSegment8_SetParam(p,a,b,c,d,e) (p)->lpVtbl->SetParam(p,a,b,c,d,e) +#define IDirectMusicSegment8_Clone(p,a,b,c) (p)->lpVtbl->Clone(p,a,b,c) +#define IDirectMusicSegment8_SetStartPoint(p,a) (p)->lpVtbl->SetStartPoint(p,a) +#define IDirectMusicSegment8_GetStartPoint(p,a) (p)->lpVtbl->GetStartPoint(p,a) +#define IDirectMusicSegment8_SetLoopPoints(p,a,b) (p)->lpVtbl->SetLoopPoints(p,a,b) +#define IDirectMusicSegment8_GetLoopPoints(p,a,b) (p)->lpVtbl->GetLoopPoints(p,a,b) +#define IDirectMusicSegment8_SetPChannelsUsed(p,a,b) (p)->lpVtbl->SetPChannelsUsed(p,a,b) +/*** IDirectMusicSegment8 methods ***/ +#define IDirectMusicSegment8_SetTrackConfig(p,a,b,c,d,e) (p)->lpVtbl->SetTrackConfig(p,a,b,c,d,e) +#define IDirectMusicSegment8_GetAudioPathConfig(p,a) (p)->lpVtbl->GetAudioPathConfig(p,a) +#define IDirectMusicSegment8_Compose(p,a,b,c,d) (p)->lpVtbl->Compose(p,a,b,c,d) +#define IDirectMusicSegment8_Download(p,a) (p)->lpVtbl->Download(p,a) +#define IDirectMusicSegment8_Unload(p,a) (p)->lpVtbl->Unload(p,a) +#endif + + +/***************************************************************************** + * IDirectMusicSegmentState interface + */ +#define INTERFACE IDirectMusicSegmentState +DECLARE_INTERFACE_(IDirectMusicSegmentState,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicSegmentState methods ***/ + STDMETHOD(GetRepeats)(THIS_ DWORD *pdwRepeats) PURE; + STDMETHOD(GetSegment)(THIS_ IDirectMusicSegment **ppSegment) PURE; + STDMETHOD(GetStartTime)(THIS_ MUSIC_TIME *pmtStart) PURE; + STDMETHOD(GetSeek)(THIS_ MUSIC_TIME *pmtSeek) PURE; + STDMETHOD(GetStartPoint)(THIS_ MUSIC_TIME *pmtStart) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicSegmentState_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicSegmentState_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicSegmentState_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicSegmentState methods ***/ +#define IDirectMusicSegmentState_GetRepeats(p,a) (p)->lpVtbl->GetRepeats(p,a) +#define IDirectMusicSegmentState_GetSegment(p,a) (p)->lpVtbl->GetSegment(p,a) +#define IDirectMusicSegmentState_GetStartTime(p,a) (p)->lpVtbl->GetStartTime(p,a) +#define IDirectMusicSegmentState_GetSeek(p,a) (p)->lpVtbl->GetSeek(p,a) +#define IDirectMusicSegmentState_GetStartPoint(p,a) (p)->lpVtbl->GetStartPoint(p,a) +#endif + + +/***************************************************************************** + * IDirectMusicSegmentState8 interface + */ +#define INTERFACE IDirectMusicSegmentState8 +DECLARE_INTERFACE_(IDirectMusicSegmentState8,IDirectMusicSegmentState) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicSegmentState methods ***/ + STDMETHOD(GetRepeats)(THIS_ DWORD *pdwRepeats) PURE; + STDMETHOD(GetSegment)(THIS_ IDirectMusicSegment **ppSegment) PURE; + STDMETHOD(GetStartTime)(THIS_ MUSIC_TIME *pmtStart) PURE; + STDMETHOD(GetSeek)(THIS_ MUSIC_TIME *pmtSeek) PURE; + STDMETHOD(GetStartPoint)(THIS_ MUSIC_TIME *pmtStart) PURE; + /*** IDirectMusicSegmentState8 methods ***/ + STDMETHOD(SetTrackConfig)(THIS_ REFGUID rguidTrackClassID, DWORD dwGroupBits, DWORD dwIndex, DWORD dwFlagsOn, DWORD dwFlagsOff) PURE; + STDMETHOD(GetObjectInPath)(THIS_ DWORD dwPChannel, DWORD dwStage, DWORD dwBuffer, REFGUID guidObject, DWORD dwIndex, REFGUID iidInterface, void **ppObject) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicSegmentState8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicSegmentState8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicSegmentState8_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicSegmentState methods ***/ +#define IDirectMusicSegmentState8_GetRepeats(p,a) (p)->lpVtbl->GetRepeats(p,a) +#define IDirectMusicSegmentState8_GetSegment(p,a) (p)->lpVtbl->GetSegment(p,a) +#define IDirectMusicSegmentState8_GetStartTime(p,a) (p)->lpVtbl->GetStartTime(p,a) +#define IDirectMusicSegmentState8_GetSeek(p,a) (p)->lpVtbl->GetSeek(p,a) +#define IDirectMusicSegmentState8_GetStartPoint(p,a) (p)->lpVtbl->GetStartPoint(p,a) +/*** IDirectMusicSegmentState8 methods ***/ +#define IDirectMusicSegmentState8_SetTrackConfig(p,a,b,c,d,e) (p)->lpVtbl->SetTrackConfig(p,a,b,c,d,e) +#define IDirectMusicSegmentState8_GetObjectInPath(p,a,b,c,d,e,f,g) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d,e,f,g) +#endif + + +/***************************************************************************** + * IDirectMusicAudioPath interface + */ +#define INTERFACE IDirectMusicAudioPath +DECLARE_INTERFACE_(IDirectMusicAudioPath,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicAudioPath methods ***/ + STDMETHOD(GetObjectInPath)(THIS_ DWORD dwPChannel, DWORD dwStage, DWORD dwBuffer, REFGUID guidObject, WORD dwIndex, REFGUID iidInterface, void **ppObject) PURE; + STDMETHOD(Activate)(THIS_ BOOL fActivate) PURE; + STDMETHOD(SetVolume)(THIS_ LONG lVolume, DWORD dwDuration) PURE; + STDMETHOD(ConvertPChannel)(THIS_ DWORD dwPChannelIn, DWORD *pdwPChannelOut) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicAudioPath_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicAudioPath_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicAudioPath_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicAudioPath methods ***/ +#define IDirectMusicAudioPath_GetObjectInPath(p,a,b,c,d,e,f,g) (p)->lpVtbl->GetObjectInPath(p,a,b,c,d,e,f,g) +#define IDirectMusicAudioPath_Activate(p,a) (p)->lpVtbl->Activate(p,a) +#define IDirectMusicAudioPath_SetVolume(p,a,b) (p)->lpVtbl->SetVolume(p,a,b) +#define IDirectMusicAudioPath_ConvertPChannel(p,a,b) (p)->lpVtbl->ConvertPChannel(p,a,b) +#endif + + +/***************************************************************************** + * IDirectMusicPerformance interface + */ +#define INTERFACE IDirectMusicPerformance +DECLARE_INTERFACE_(IDirectMusicPerformance,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicPerformance methods ***/ + STDMETHOD(Init)(THIS_ IDirectMusic **ppDirectMusic, LPDIRECTSOUND pDirectSound, HWND hWnd) PURE; + STDMETHOD(PlaySegment)(THIS_ IDirectMusicSegment *pSegment, DWORD dwFlags, __int64 i64StartTime, IDirectMusicSegmentState **ppSegmentState) PURE; + STDMETHOD(Stop)(THIS_ IDirectMusicSegment *pSegment, IDirectMusicSegmentState *pSegmentState, MUSIC_TIME mtTime, DWORD dwFlags) PURE; + STDMETHOD(GetSegmentState)(THIS_ IDirectMusicSegmentState **ppSegmentState, MUSIC_TIME mtTime) PURE; + STDMETHOD(SetPrepareTime)(THIS_ DWORD dwMilliSeconds) PURE; + STDMETHOD(GetPrepareTime)(THIS_ DWORD *pdwMilliSeconds) PURE; + STDMETHOD(SetBumperLength)(THIS_ DWORD dwMilliSeconds) PURE; + STDMETHOD(GetBumperLength)(THIS_ DWORD *pdwMilliSeconds) PURE; + STDMETHOD(SendPMsg)(THIS_ DMUS_PMSG *pPMSG) PURE; + STDMETHOD(MusicToReferenceTime)(THIS_ MUSIC_TIME mtTime, REFERENCE_TIME *prtTime) PURE; + STDMETHOD(ReferenceToMusicTime)(THIS_ REFERENCE_TIME rtTime, MUSIC_TIME *pmtTime) PURE; + STDMETHOD(IsPlaying)(THIS_ IDirectMusicSegment *pSegment, IDirectMusicSegmentState *pSegState) PURE; + STDMETHOD(GetTime)(THIS_ REFERENCE_TIME *prtNow, MUSIC_TIME *pmtNow) PURE; + STDMETHOD(AllocPMsg)(THIS_ ULONG cb, DMUS_PMSG **ppPMSG) PURE; + STDMETHOD(FreePMsg)(THIS_ DMUS_PMSG *pPMSG) PURE; + STDMETHOD(GetGraph)(THIS_ struct IDirectMusicGraph **ppGraph) PURE; + STDMETHOD(SetGraph)(THIS_ struct IDirectMusicGraph *pGraph) PURE; + STDMETHOD(SetNotificationHandle)(THIS_ HANDLE hNotification, REFERENCE_TIME rtMinimum) PURE; + STDMETHOD(GetNotificationPMsg)(THIS_ DMUS_NOTIFICATION_PMSG **ppNotificationPMsg) PURE; + STDMETHOD(AddNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(RemoveNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(AddPort)(THIS_ IDirectMusicPort *pPort) PURE; + STDMETHOD(RemovePort)(THIS_ IDirectMusicPort *pPort) PURE; + STDMETHOD(AssignPChannelBlock)(THIS_ DWORD dwBlockNum, IDirectMusicPort *pPort, DWORD dwGroup) PURE; + STDMETHOD(AssignPChannel)(THIS_ DWORD dwPChannel, IDirectMusicPort *pPort, DWORD dwGroup, DWORD dwMChannel) PURE; + STDMETHOD(PChannelInfo)(THIS_ DWORD dwPChannel, IDirectMusicPort **ppPort, DWORD *pdwGroup, DWORD *pdwMChannel) PURE; + STDMETHOD(DownloadInstrument)(THIS_ IDirectMusicInstrument *pInst, DWORD dwPChannel, IDirectMusicDownloadedInstrument **ppDownInst, DMUS_NOTERANGE *pNoteRanges, DWORD dwNumNoteRanges, IDirectMusicPort **ppPort, DWORD *pdwGroup, DWORD *pdwMChannel) PURE; + STDMETHOD(Invalidate)(THIS_ MUSIC_TIME mtTime, DWORD dwFlags) PURE; + STDMETHOD(GetParam)(THIS_ REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) PURE; + STDMETHOD(SetParam)(THIS_ REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, void *pParam) PURE; + STDMETHOD(GetGlobalParam)(THIS_ REFGUID rguidType, void *pParam, DWORD dwSize) PURE; + STDMETHOD(SetGlobalParam)(THIS_ REFGUID rguidType, void *pParam, DWORD dwSize) PURE; + STDMETHOD(GetLatencyTime)(THIS_ REFERENCE_TIME *prtTime) PURE; + STDMETHOD(GetQueueTime)(THIS_ REFERENCE_TIME *prtTime) PURE; + STDMETHOD(AdjustTime)(THIS_ REFERENCE_TIME rtAmount) PURE; + STDMETHOD(CloseDown)(THIS) PURE; + STDMETHOD(GetResolvedTime)(THIS_ REFERENCE_TIME rtTime, REFERENCE_TIME *prtResolved, DWORD dwTimeResolveFlags) PURE; + STDMETHOD(MIDIToMusic)(THIS_ BYTE bMIDIValue, DMUS_CHORD_KEY *pChord, BYTE bPlayMode, BYTE bChordLevel, WORD *pwMusicValue) PURE; + STDMETHOD(MusicToMIDI)(THIS_ WORD wMusicValue, DMUS_CHORD_KEY *pChord, BYTE bPlayMode, BYTE bChordLevel, BYTE *pbMIDIValue) PURE; + STDMETHOD(TimeToRhythm)(THIS_ MUSIC_TIME mtTime, DMUS_TIMESIGNATURE *pTimeSig, WORD *pwMeasure, BYTE *pbBeat, BYTE *pbGrid, short *pnOffset) PURE; + STDMETHOD(RhythmToTime)(THIS_ WORD wMeasure, BYTE bBeat, BYTE bGrid, short nOffset, DMUS_TIMESIGNATURE *pTimeSig, MUSIC_TIME *pmtTime) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicPerformance_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicPerformance_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicPerformance_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicPerformance methods ***/ +#define IDirectMusicPerformance_Init(p,a,b,c) (p)->lpVtbl->Init(p,a,b,c) +#define IDirectMusicPerformance_PlaySegment(p,a,b,c,d) (p)->lpVtbl->PlaySegment(p,a,b,c,d) +#define IDirectMusicPerformance_Stop(p,a,b,c,d) (p)->lpVtbl->Stop(p,a,b,c,d) +#define IDirectMusicPerformance_GetSegmentState(p,a,b) (p)->lpVtbl->GetSegmentState(p,a,b) +#define IDirectMusicPerformance_SetPrepareTime(p,a) (p)->lpVtbl->SetPrepareTime(p,a) +#define IDirectMusicPerformance_GetPrepareTime(p,a) (p)->lpVtbl->GetPrepareTime(p,a) +#define IDirectMusicPerformance_SetBumperLength(p,a) (p)->lpVtbl->SetBumperLength(p,a) +#define IDirectMusicPerformance_GetBumperLength(p,a) (p)->lpVtbl->GetBumperLength(p,a) +#define IDirectMusicPerformance_SendPMsg(p,a) (p)->lpVtbl->SendPMsg(p,a) +#define IDirectMusicPerformance_MusicToReferenceTime(p,a,b) (p)->lpVtbl->MusicToReferenceTime(p,a,b) +#define IDirectMusicPerformance_ReferenceToMusicTime(p,a,b) (p)->lpVtbl->ReferenceToMusicTime(p,a,b) +#define IDirectMusicPerformance_IsPlaying(p,a,b) (p)->lpVtbl->IsPlaying(p,a,b) +#define IDirectMusicPerformance_GetTime(p,a,b) (p)->lpVtbl->GetTime(p,a,b) +#define IDirectMusicPerformance_AllocPMsg(p,a,b) (p)->lpVtbl->AllocPMsg(p,a,b) +#define IDirectMusicPerformance_FreePMsg(p,a) (p)->lpVtbl->FreePMsg(p,a) +#define IDirectMusicPerformance_GetGraph(p,a) (p)->lpVtbl->GetGraph(p,a) +#define IDirectMusicPerformance_SetGraph(p,a) (p)->lpVtbl->SetGraph(p,a) +#define IDirectMusicPerformance_SetNotificationHandle(p,a,b) (p)->lpVtbl->SetNotificationHandle(p,a,b) +#define IDirectMusicPerformance_GetNotificationPMsg(p,a) (p)->lpVtbl->GetNotificationPMsg(p,a) +#define IDirectMusicPerformance_AddNotificationType(p,a) (p)->lpVtbl->AddNotificationType(p,a) +#define IDirectMusicPerformance_RemoveNotificationType(p,a) (p)->lpVtbl->RemoveNotificationType(p,a) +#define IDirectMusicPerformance_AddPort(p,a) (p)->lpVtbl->AddPort(p,a) +#define IDirectMusicPerformance_RemovePort(p,a) (p)->lpVtbl->RemovePort(p,a) +#define IDirectMusicPerformance_AssignPChannelBlock(p,a,b,c) (p)->lpVtbl->AssignPChannelBlock(p,a,b,c) +#define IDirectMusicPerformance_AssignPChannel(p,a,b,c,d) (p)->lpVtbl->AssignPChannel(p,a,b,c,d) +#define IDirectMusicPerformance_PChannelInfo(p,a,b,c,d) (p)->lpVtbl->PChannelInfo(p,a,b,c,d) +#define IDirectMusicPerformance_DownloadInstrument(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->DownloadInstrument(p,a,b,c,d,e,f,g,h) +#define IDirectMusicPerformance_Invalidate(p,a,b) (p)->lpVtbl->Invalidate(p,a,b) +#define IDirectMusicPerformance_GetParam(p,a,b,c,d,e,f) (p)->lpVtbl->GetParam(p,a,b,c,d,e,f) +#define IDirectMusicPerformance_SetParam(p,a,b,c,d,e) (p)->lpVtbl->SetParam(p,a,b,c,d,e) +#define IDirectMusicPerformance_GetGlobalParam(p,a,b,c) (p)->lpVtbl->GetGlobalParam(p,a,b,c) +#define IDirectMusicPerformance_SetGlobalParam(p,a,b,c) (p)->lpVtbl->SetGlobalParam(p,a,b,c) +#define IDirectMusicPerformance_GetLatencyTime(p,a) (p)->lpVtbl->GetLatencyTime(p,a) +#define IDirectMusicPerformance_GetQueueTime(p,a) (p)->lpVtbl->GetQueueTime(p,a) +#define IDirectMusicPerformance_AdjustTime(p,a) (p)->lpVtbl->AdjustTime(p,a) +#define IDirectMusicPerformance_CloseDown(p) (p)->lpVtbl->CloseDown(p) +#define IDirectMusicPerformance_GetResolvedTime(p,a,b,c) (p)->lpVtbl->GetResolvedTime(p,a,b,c) +#define IDirectMusicPerformance_MIDIToMusic(p,a,b,c,d,e) (p)->lpVtbl->MIDIToMusic(p,a,b,c,d,e) +#define IDirectMusicPerformance_MusicToMIDI(p,a,b,c,d,e) (p)->lpVtbl->MusicToMIDI(p,a,b,c,d,e) +#define IDirectMusicPerformance_TimeToRhythm(p,a,b,c,d,e,f) (p)->lpVtbl->TimeToRhythm(p,a,b,c,d,e,f) +#define IDirectMusicPerformance_RhythmToTime(p,a,b,c,d,e,f) (p)->lpVtbl->RhythmToTime(p,a,b,c,d,e,f) +#endif + + +/***************************************************************************** + * IDirectMusicPerformance8 interface + */ +#define INTERFACE IDirectMusicPerformance8 +DECLARE_INTERFACE_(IDirectMusicPerformance8,IDirectMusicPerformance) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicPerformance methods ***/ + STDMETHOD(Init)(THIS_ IDirectMusic **ppDirectMusic, LPDIRECTSOUND pDirectSound, HWND hWnd) PURE; + STDMETHOD(PlaySegment)(THIS_ IDirectMusicSegment *pSegment, DWORD dwFlags, __int64 i64StartTime, IDirectMusicSegmentState **ppSegmentState) PURE; + STDMETHOD(Stop)(THIS_ IDirectMusicSegment *pSegment, IDirectMusicSegmentState *pSegmentState, MUSIC_TIME mtTime, DWORD dwFlags) PURE; + STDMETHOD(GetSegmentState)(THIS_ IDirectMusicSegmentState **ppSegmentState, MUSIC_TIME mtTime) PURE; + STDMETHOD(SetPrepareTime)(THIS_ DWORD dwMilliSeconds) PURE; + STDMETHOD(GetPrepareTime)(THIS_ DWORD *pdwMilliSeconds) PURE; + STDMETHOD(SetBumperLength)(THIS_ DWORD dwMilliSeconds) PURE; + STDMETHOD(GetBumperLength)(THIS_ DWORD *pdwMilliSeconds) PURE; + STDMETHOD(SendPMsg)(THIS_ DMUS_PMSG *pPMSG) PURE; + STDMETHOD(MusicToReferenceTime)(THIS_ MUSIC_TIME mtTime, REFERENCE_TIME *prtTime) PURE; + STDMETHOD(ReferenceToMusicTime)(THIS_ REFERENCE_TIME rtTime, MUSIC_TIME *pmtTime) PURE; + STDMETHOD(IsPlaying)(THIS_ IDirectMusicSegment *pSegment, IDirectMusicSegmentState *pSegState) PURE; + STDMETHOD(GetTime)(THIS_ REFERENCE_TIME *prtNow, MUSIC_TIME *pmtNow) PURE; + STDMETHOD(AllocPMsg)(THIS_ ULONG cb, DMUS_PMSG **ppPMSG) PURE; + STDMETHOD(FreePMsg)(THIS_ DMUS_PMSG *pPMSG) PURE; + STDMETHOD(GetGraph)(THIS_ struct IDirectMusicGraph **ppGraph) PURE; + STDMETHOD(SetGraph)(THIS_ struct IDirectMusicGraph *pGraph) PURE; + STDMETHOD(SetNotificationHandle)(THIS_ HANDLE hNotification, REFERENCE_TIME rtMinimum) PURE; + STDMETHOD(GetNotificationPMsg)(THIS_ DMUS_NOTIFICATION_PMSG **ppNotificationPMsg) PURE; + STDMETHOD(AddNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(RemoveNotificationType)(THIS_ REFGUID rguidNotificationType) PURE; + STDMETHOD(AddPort)(THIS_ IDirectMusicPort *pPort) PURE; + STDMETHOD(RemovePort)(THIS_ IDirectMusicPort *pPort) PURE; + STDMETHOD(AssignPChannelBlock)(THIS_ DWORD dwBlockNum, IDirectMusicPort *pPort, DWORD dwGroup) PURE; + STDMETHOD(AssignPChannel)(THIS_ DWORD dwPChannel, IDirectMusicPort *pPort, DWORD dwGroup, DWORD dwMChannel) PURE; + STDMETHOD(PChannelInfo)(THIS_ DWORD dwPChannel, IDirectMusicPort **ppPort, DWORD *pdwGroup, DWORD *pdwMChannel) PURE; + STDMETHOD(DownloadInstrument)(THIS_ IDirectMusicInstrument *pInst, DWORD dwPChannel, IDirectMusicDownloadedInstrument **ppDownInst, DMUS_NOTERANGE *pNoteRanges, DWORD dwNumNoteRanges, IDirectMusicPort **ppPort, DWORD *pdwGroup, DWORD *pdwMChannel) PURE; + STDMETHOD(Invalidate)(THIS_ MUSIC_TIME mtTime, DWORD dwFlags) PURE; + STDMETHOD(GetParam)(THIS_ REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) PURE; + STDMETHOD(SetParam)(THIS_ REFGUID rguidType, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, void *pParam) PURE; + STDMETHOD(GetGlobalParam)(THIS_ REFGUID rguidType, void *pParam, DWORD dwSize) PURE; + STDMETHOD(SetGlobalParam)(THIS_ REFGUID rguidType, void *pParam, DWORD dwSize) PURE; + STDMETHOD(GetLatencyTime)(THIS_ REFERENCE_TIME *prtTime) PURE; + STDMETHOD(GetQueueTime)(THIS_ REFERENCE_TIME *prtTime) PURE; + STDMETHOD(AdjustTime)(THIS_ REFERENCE_TIME rtAmount) PURE; + STDMETHOD(CloseDown)(THIS) PURE; + STDMETHOD(GetResolvedTime)(THIS_ REFERENCE_TIME rtTime, REFERENCE_TIME *prtResolved, DWORD dwTimeResolveFlags) PURE; + STDMETHOD(MIDIToMusic)(THIS_ BYTE bMIDIValue, DMUS_CHORD_KEY *pChord, BYTE bPlayMode, BYTE bChordLevel, WORD *pwMusicValue) PURE; + STDMETHOD(MusicToMIDI)(THIS_ WORD wMusicValue, DMUS_CHORD_KEY *pChord, BYTE bPlayMode, BYTE bChordLevel, BYTE *pbMIDIValue) PURE; + STDMETHOD(TimeToRhythm)(THIS_ MUSIC_TIME mtTime, DMUS_TIMESIGNATURE *pTimeSig, WORD *pwMeasure, BYTE *pbBeat, BYTE *pbGrid, short *pnOffset) PURE; + STDMETHOD(RhythmToTime)(THIS_ WORD wMeasure, BYTE bBeat, BYTE bGrid, short nOffset, DMUS_TIMESIGNATURE *pTimeSig, MUSIC_TIME *pmtTime) PURE; + /*** IDirectMusicPerformance8 methods ***/ + STDMETHOD(InitAudio)(THIS_ IDirectMusic **ppDirectMusic, IDirectSound **ppDirectSound, HWND hWnd, DWORD dwDefaultPathType, DWORD dwPChannelCount, DWORD dwFlags, DMUS_AUDIOPARAMS *pParams) PURE; + STDMETHOD(PlaySegmentEx)(THIS_ IUnknown *pSource, WCHAR *pwzSegmentName, IUnknown *pTransition, DWORD dwFlags, __int64 i64StartTime, IDirectMusicSegmentState **ppSegmentState, IUnknown *pFrom, IUnknown *pAudioPath) PURE; + STDMETHOD(StopEx)(THIS_ IUnknown *pObjectToStop, __int64 i64StopTime, DWORD dwFlags) PURE; + STDMETHOD(ClonePMsg)(THIS_ DMUS_PMSG *pSourcePMSG, DMUS_PMSG **ppCopyPMSG) PURE; + STDMETHOD(CreateAudioPath)(THIS_ IUnknown *pSourceConfig, BOOL fActivate, IDirectMusicAudioPath **ppNewPath) PURE; + STDMETHOD(CreateStandardAudioPath)(THIS_ DWORD dwType, DWORD dwPChannelCount, BOOL fActivate, IDirectMusicAudioPath **ppNewPath) PURE; + STDMETHOD(SetDefaultAudioPath)(THIS_ IDirectMusicAudioPath *pAudioPath) PURE; + STDMETHOD(GetDefaultAudioPath)(THIS_ IDirectMusicAudioPath **ppAudioPath) PURE; + STDMETHOD(GetParamEx)(THIS_ REFGUID rguidType, DWORD dwTrackID, DWORD dwGroupBits, DWORD dwIndex, MUSIC_TIME mtTime, MUSIC_TIME *pmtNext, void *pParam) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicPerformance8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicPerformance8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicPerformance8_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicPerformance methods ***/ +#define IDirectMusicPerformance8_Init(p,a,b,c) (p)->lpVtbl->Init(p,a,b,c) +#define IDirectMusicPerformance8_PlaySegment(p,a,b,c,d) (p)->lpVtbl->PlaySegment(p,a,b,c,d) +#define IDirectMusicPerformance8_Stop(p,a,b,c,d) (p)->lpVtbl->Stop(p,a,b,c,d) +#define IDirectMusicPerformance8_GetSegmentState(p,a,b) (p)->lpVtbl->GetSegmentState(p,a,b) +#define IDirectMusicPerformance8_SetPrepareTime(p,a) (p)->lpVtbl->SetPrepareTime(p,a) +#define IDirectMusicPerformance8_GetPrepareTime(p,a) (p)->lpVtbl->GetPrepareTime(p,a) +#define IDirectMusicPerformance8_SetBumperLength(p,a) (p)->lpVtbl->SetBumperLength(p,a) +#define IDirectMusicPerformance8_GetBumperLength(p,a) (p)->lpVtbl->GetBumperLength(p,a) +#define IDirectMusicPerformance8_SendPMsg(p,a) (p)->lpVtbl->SendPMsg(p,a) +#define IDirectMusicPerformance8_MusicToReferenceTime(p,a,b) (p)->lpVtbl->MusicToReferenceTime(p,a,b) +#define IDirectMusicPerformance8_ReferenceToMusicTime(p,a,b) (p)->lpVtbl->ReferenceToMusicTime(p,a,b) +#define IDirectMusicPerformance8_IsPlaying(p,a,b) (p)->lpVtbl->IsPlaying(p,a,b) +#define IDirectMusicPerformance8_GetTime(p,a,b) (p)->lpVtbl->GetTime(p,a,b) +#define IDirectMusicPerformance8_AllocPMsg(p,a,b) (p)->lpVtbl->AllocPMsg(p,a,b) +#define IDirectMusicPerformance8_FreePMsg(p,a) (p)->lpVtbl->FreePMsg(p,a) +#define IDirectMusicPerformance8_GetGraph(p,a) (p)->lpVtbl->GetGraph(p,a) +#define IDirectMusicPerformance8_SetGraph(p,a) (p)->lpVtbl->SetGraph(p,a) +#define IDirectMusicPerformance8_SetNotificationHandle(p,a,b) (p)->lpVtbl->SetNotificationHandle(p,a,b) +#define IDirectMusicPerformance8_GetNotificationPMsg(p,a) (p)->lpVtbl->GetNotificationPMsg(p,a) +#define IDirectMusicPerformance8_AddNotificationType(p,a) (p)->lpVtbl->AddNotificationType(p,a) +#define IDirectMusicPerformance8_RemoveNotificationType(p,a) (p)->lpVtbl->RemoveNotificationType(p,a) +#define IDirectMusicPerformance8_AddPort(p,a) (p)->lpVtbl->AddPort(p,a) +#define IDirectMusicPerformance8_RemovePort(p,a) (p)->lpVtbl->RemovePort(p,a) +#define IDirectMusicPerformance8_AssignPChannelBlock(p,a,b,c) (p)->lpVtbl->AssignPChannelBlock(p,a,b,c) +#define IDirectMusicPerformance8_AssignPChannel(p,a,b,c,d) (p)->lpVtbl->AssignPChannel(p,a,b,c,d) +#define IDirectMusicPerformance8_PChannelInfo(p,a,b,c,d) (p)->lpVtbl->PChannelInfo(p,a,b,c,d) +#define IDirectMusicPerformance8_DownloadInstrument(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->DownloadInstrument(p,a,b,c,d,e,f,g,h) +#define IDirectMusicPerformance8_Invalidate(p,a,b) (p)->lpVtbl->Invalidate(p,a,b) +#define IDirectMusicPerformance8_GetParam(p,a,b,c,d,e,f) (p)->lpVtbl->GetParam(p,a,b,c,d,e,f) +#define IDirectMusicPerformance8_SetParam(p,a,b,c,d,e) (p)->lpVtbl->SetParam(p,a,b,c,d,e) +#define IDirectMusicPerformance8_GetGlobalParam(p,a,b,c) (p)->lpVtbl->GetGlobalParam(p,a,b,c) +#define IDirectMusicPerformance8_SetGlobalParam(p,a,b,c) (p)->lpVtbl->SetGlobalParam(p,a,b,c) +#define IDirectMusicPerformance8_GetLatencyTime(p,a) (p)->lpVtbl->GetLatencyTime(p,a) +#define IDirectMusicPerformance8_GetQueueTime(p,a) (p)->lpVtbl->GetQueueTime(p,a) +#define IDirectMusicPerformance8_AdjustTime(p,a) (p)->lpVtbl->AdjustTime(p,a) +#define IDirectMusicPerformance8_CloseDown(p) (p)->lpVtbl->CloseDown(p) +#define IDirectMusicPerformance8_GetResolvedTime(p,a,b,c) (p)->lpVtbl->GetResolvedTime(p,a,b,c) +#define IDirectMusicPerformance8_MIDIToMusic(p,a,b,c,d,e) (p)->lpVtbl->MIDIToMusic(p,a,b,c,d,e) +#define IDirectMusicPerformance8_MusicToMIDI(p,a,b,c,d,e) (p)->lpVtbl->MusicToMIDI(p,a,b,c,d,e) +#define IDirectMusicPerformance8_TimeToRhythm(p,a,b,c,d,e,f) (p)->lpVtbl->TimeToRhythm(p,a,b,c,d,e,f) +#define IDirectMusicPerformance8_RhythmToTime(p,a,b,c,d,e,f) (p)->lpVtbl->RhythmToTime(p,a,b,c,d,e,f) + /* IDirectMusicPerformance8 methods*/ +#define IDirectMusicPerformance8_InitAudio(p,a,b,c,d,e,f,g) (p)->lpVtbl->InitAudio(p,a,b,c,d,e,f,g) +#define IDirectMusicPerformance8_PlaySegmentEx(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->PlaySegmentEx(p,a,b,c,d,e,f,g,h) +#define IDirectMusicPerformance8_StopEx(p,a,b,c) (p)->lpVtbl->StopEx(p,a,b,c) +#define IDirectMusicPerformance8_ClonePMsg(p,a,b) (p)->lpVtbl->ClonePMsg(p,a,b) +#define IDirectMusicPerformance8_CreateAudioPath(p,a,b,c) (p)->lpVtbl->CreateAudioPath(p,a,b,c) +#define IDirectMusicPerformance8_CreateStandardAudioPath(p,a,b,c,d) (p)->lpVtbl->CreateStandardAudioPath(p,a,b,c,d) +#define IDirectMusicPerformance8_SetDefaultAudioPath(p,a) (p)->lpVtbl->SetDefaultAudioPath(p,a) +#define IDirectMusicPerformance8_GetDefaultAudioPath(p,a) (p)->lpVtbl->GetDefaultAudioPath(p,a) +#define IDirectMusicPerformance8_GetParamEx(p,a,b,c,d,e,f,g) (p)->lpVtbl->GetParamEx(p,a,b,c,d,e,f,g) +#endif + + +/***************************************************************************** + * IDirectMusicGraph interface + */ +#define INTERFACE IDirectMusicGraph +DECLARE_INTERFACE_(IDirectMusicGraph,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicGraph methods ***/ + STDMETHOD(StampPMsg)(THIS_ DMUS_PMSG *pPMSG) PURE; + STDMETHOD(InsertTool)(THIS_ IDirectMusicTool *pTool, DWORD *pdwPChannels, DWORD cPChannels, LONG lIndex) PURE; + STDMETHOD(GetTool)(THIS_ DWORD dwIndex, IDirectMusicTool **ppTool) PURE; + STDMETHOD(RemoveTool)(THIS_ IDirectMusicTool *pTool) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicGraph_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicGraph_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicGraph_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicGraph methods ***/ +#define IDirectMusicGraph_StampPMsg(p,a) (p)->lpVtbl->StampPMsg(p,a) +#define IDirectMusicGraph_InsertTool(p,a,b,c,d) (p)->lpVtbl->InsertTool(p,a,b,c,d) +#define IDirectMusicGraph_GetTool(p,a,b) (p)->lpVtbl->GetTool(p,a,b) +#define IDirectMusicGraph_RemoveTool(p,a) (p)->lpVtbl->RemoveTool(p,a) +#endif + + +/***************************************************************************** + * IDirectMusicStyle interface + */ +#define INTERFACE IDirectMusicStyle +DECLARE_INTERFACE_(IDirectMusicStyle,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicStyle methods ***/ + STDMETHOD(GetBand)(THIS_ WCHAR *pwszName, IDirectMusicBand **ppBand) PURE; + STDMETHOD(EnumBand)(THIS_ DWORD dwIndex, WCHAR *pwszName) PURE; + STDMETHOD(GetDefaultBand)(THIS_ IDirectMusicBand **ppBand) PURE; + STDMETHOD(EnumMotif)(THIS_ DWORD dwIndex, WCHAR *pwszName) PURE; + STDMETHOD(GetMotif)(THIS_ WCHAR *pwszName, IDirectMusicSegment **ppSegment) PURE; + STDMETHOD(GetDefaultChordMap)(THIS_ struct IDirectMusicChordMap **ppChordMap) PURE; + STDMETHOD(EnumChordMap)(THIS_ DWORD dwIndex, WCHAR *pwszName) PURE; + STDMETHOD(GetChordMap)(THIS_ WCHAR *pwszName, struct IDirectMusicChordMap **ppChordMap) PURE; + STDMETHOD(GetTimeSignature)(THIS_ DMUS_TIMESIGNATURE *pTimeSig) PURE; + STDMETHOD(GetEmbellishmentLength)(THIS_ DWORD dwType, DWORD dwLevel, DWORD *pdwMin, DWORD *pdwMax) PURE; + STDMETHOD(GetTempo)(THIS_ double *pTempo) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicStyle_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicStyle_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicStyle_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicStyle methods ***/ +#define IDirectMusicStyle_GetBand(p,a,b) (p)->lpVtbl->GetBand(p,a,b) +#define IDirectMusicStyle_EnumBand(p,a,b) (p)->lpVtbl->EnumBand(p,a,b) +#define IDirectMusicStyle_GetDefaultBand(p,a) (p)->lpVtbl->GetDefaultBand(p,a) +#define IDirectMusicStyle_EnumMotif(p,a,b) (p)->lpVtbl->EnumMotif(p,a,b) +#define IDirectMusicStyle_GetMotif(p,a,b) (p)->lpVtbl->GetMotif(p,a,b) +#define IDirectMusicStyle_GetDefaultChordMap(p,a) (p)->lpVtbl->GetDefaultChordMap(p,a) +#define IDirectMusicStyle_EnumChordMap(p,a,b) (p)->lpVtbl->EnumChordMap(p,a,b) +#define IDirectMusicStyle_GetChordMap(p,a,b) (p)->lpVtbl->GetChordMap(p,a,b) +#define IDirectMusicStyle_GetTimeSignature(p,a) (p)->lpVtbl->GetTimeSignature(p,a) +#define IDirectMusicStyle_GetEmbellishmentLength(p,a,b,c,d) (p)->lpVtbl->GetEmbellishmentLength(p,a,b,c,d) +#define IDirectMusicStyle_GetTempo(p,a) (p)->lpVtbl->GetTempo(p,a) +#endif + + +/***************************************************************************** + * IDirectMusicStyle8 interface + */ +#define INTERFACE IDirectMusicStyle8 +DECLARE_INTERFACE_(IDirectMusicStyle8,IDirectMusicStyle) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicStyle methods ***/ + STDMETHOD(GetBand)(THIS_ WCHAR *pwszName, IDirectMusicBand **ppBand) PURE; + STDMETHOD(EnumBand)(THIS_ DWORD dwIndex, WCHAR *pwszName) PURE; + STDMETHOD(GetDefaultBand)(THIS_ IDirectMusicBand **ppBand) PURE; + STDMETHOD(EnumMotif)(THIS_ DWORD dwIndex, WCHAR *pwszName) PURE; + STDMETHOD(GetMotif)(THIS_ WCHAR *pwszName, IDirectMusicSegment **ppSegment) PURE; + STDMETHOD(GetDefaultChordMap)(THIS_ struct IDirectMusicChordMap **ppChordMap) PURE; + STDMETHOD(EnumChordMap)(THIS_ DWORD dwIndex, WCHAR *pwszName) PURE; + STDMETHOD(GetChordMap)(THIS_ WCHAR *pwszName, struct IDirectMusicChordMap **ppChordMap) PURE; + STDMETHOD(GetTimeSignature)(THIS_ DMUS_TIMESIGNATURE *pTimeSig) PURE; + STDMETHOD(GetEmbellishmentLength)(THIS_ DWORD dwType, DWORD dwLevel, DWORD *pdwMin, DWORD *pdwMax) PURE; + STDMETHOD(GetTempo)(THIS_ double *pTempo) PURE; + /*** IDirectMusicStyle8 methods ***/ + STDMETHOD(EnumPattern)(THIS_ DWORD dwIndex, DWORD dwPatternType, WCHAR *pwszName) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicStyle8_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicStyle8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicStyle8_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicStyle methods ***/ +#define IDirectMusicStyle8_GetBand(p,a,b) (p)->lpVtbl->GetBand(p,a,b) +#define IDirectMusicStyle8_EnumBand(p,a,b) (p)->lpVtbl->EnumBand(p,a,b) +#define IDirectMusicStyle8_GetDefaultBand(p,a) (p)->lpVtbl->GetDefaultBand(p,a) +#define IDirectMusicStyle8_EnumMotif(p,a,b) (p)->lpVtbl->EnumMotif(p,a,b) +#define IDirectMusicStyle8_GetMotif(p,a,b) (p)->lpVtbl->GetMotif(p,a,b) +#define IDirectMusicStyle8_GetDefaultChordMap(p,a) (p)->lpVtbl->GetDefaultChordMap(p,a) +#define IDirectMusicStyle8_EnumChordMap(p,a,b) (p)->lpVtbl->EnumChordMap(p,a,b) +#define IDirectMusicStyle8_GetChordMap(p,a,b) (p)->lpVtbl->GetChordMap(p,a,b) +#define IDirectMusicStyle8_GetTimeSignature(p,a) (p)->lpVtbl->GetTimeSignature(p,a) +#define IDirectMusicStyle8_GetEmbellishmentLength(p,a,b,c,d) (p)->lpVtbl->GetEmbellishmentLength(p,a,b,c,d) +#define IDirectMusicStyle8_GetTempo(p,a) (p)->lpVtbl->GetTempo(p,a) +/*** IDirectMusicStyle8 methods ***/ +#define IDirectMusicStyle8_EnumPattern(p,a,b,c) (p)->lpVtbl->EnumPattern(p,a,b,c) +#endif + + +/***************************************************************************** + * IDirectMusicChordMap interface + */ +#define INTERFACE IDirectMusicChordMap +DECLARE_INTERFACE_(IDirectMusicChordMap,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicChordMap methods ***/ + STDMETHOD(GetScale)(THIS_ DWORD *pdwScale) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicChordMap_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicChordMap_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicChordMap_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicChordMap methods ***/ +#define IDirectMusicChordMap_GetScale(p,a) (p)->lpVtbl->GetScale(p,a) +#endif + + +/***************************************************************************** + * IDirectMusicComposer interface + */ +#define INTERFACE IDirectMusicComposer +DECLARE_INTERFACE_(IDirectMusicComposer,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicComposer methods ***/ + STDMETHOD(ComposeSegmentFromTemplate)(THIS_ IDirectMusicStyle *pStyle, IDirectMusicSegment *pTemplate, WORD wActivity, IDirectMusicChordMap *pChordMap, IDirectMusicSegment **ppSegment) PURE; + STDMETHOD(ComposeSegmentFromShape)(THIS_ IDirectMusicStyle *pStyle, WORD wNumMeasures, WORD wShape, WORD wActivity, BOOL fIntro, BOOL fEnd, IDirectMusicChordMap *pChordMap, IDirectMusicSegment **ppSegment) PURE; + STDMETHOD(ComposeTransition)(THIS_ IDirectMusicSegment *pFromSeg, IDirectMusicSegment *pToSeg, MUSIC_TIME mtTime, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap *pChordMap, IDirectMusicSegment **ppTransSeg) PURE; + STDMETHOD(AutoTransition)(THIS_ IDirectMusicPerformance *pPerformance, IDirectMusicSegment *pToSeg, WORD wCommand, DWORD dwFlags, IDirectMusicChordMap *pChordMap, IDirectMusicSegment **ppTransSeg, IDirectMusicSegmentState **ppToSegState, IDirectMusicSegmentState **ppTransSegState) PURE; + STDMETHOD(ComposeTemplateFromShape)(THIS_ WORD wNumMeasures, WORD wShape, BOOL fIntro, BOOL fEnd, WORD wEndLength, IDirectMusicSegment **ppTemplate) PURE; + STDMETHOD(ChangeChordMap)(THIS_ IDirectMusicSegment *pSegment, BOOL fTrackScale, IDirectMusicChordMap *pChordMap) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicComposer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicComposer_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicComposer_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicComposer methods ***/ +#define IDirectMusicComposer_ComposeSegmentFromTemplate(p,a,b,c,d,e) (p)->lpVtbl->ComposeSegmentFromTemplate(p,a,b,c,d,e) +#define IDirectMusicComposer_ComposeSegmentFromShape(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->ComposeSegmentFromShape(p,a,b,c,d,e,f,g,h) +#define IDirectMusicComposer_ComposeTransition(p,a,b,c,d,e,f,g) (p)->lpVtbl->ComposeTransition(p,a,b,c,d,e,f,g) +#define IDirectMusicComposer_AutoTransition(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->AutoTransition(p,a,b,c,d,e,f,g,h) +#define IDirectMusicComposer_ComposeTemplateFromShape(p,a,b,c,d,e,f) (p)->lpVtbl->ComposeTemplateFromShape(p,a,b,c,d,e,f) +#define IDirectMusicComposer_ChangeChordMap(p,a,b,c) (p)->lpVtbl->ChangeChordMap(p,a,b,c) +#endif + + +/***************************************************************************** + * IDirectMusicPatternTrack interface + */ +#define INTERFACE IDirectMusicPatternTrack +DECLARE_INTERFACE_(IDirectMusicPatternTrack,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicPatternTrack methods ***/ + STDMETHOD(CreateSegment)(THIS_ IDirectMusicStyle *pStyle, IDirectMusicSegment **ppSegment) PURE; + STDMETHOD(SetVariation)(THIS_ IDirectMusicSegmentState *pSegState, DWORD dwVariationFlags, DWORD dwPart) PURE; + STDMETHOD(SetPatternByName)(THIS_ IDirectMusicSegmentState *pSegState, WCHAR *wszName, IDirectMusicStyle *pStyle, DWORD dwPatternType, DWORD *pdwLength) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicPatternTrack_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicPatternTrack_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicPatternTrack_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicPatternTrack methods ***/ +#define IDirectMusicPatternTrack_CreateSegment(p,a,b) (p)->lpVtbl->CreateSegment(p,a,b) +#define IDirectMusicPatternTrack_SetVariation(p,a,b,c) (p)->lpVtbl->SetVariation(p,a,b,c) +#define IDirectMusicPatternTrack_SetPatternByName(p,a,b,c,d,e) (p)->lpVtbl->SetPatternByName(p,a,b,c,d,e) +#endif + + +/***************************************************************************** + * IDirectMusicScript interface + */ +#define INTERFACE IDirectMusicScript +DECLARE_INTERFACE_(IDirectMusicScript,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicScript methods ***/ + STDMETHOD(Init)(THIS_ IDirectMusicPerformance *pPerformance, DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; + STDMETHOD(CallRoutine)(THIS_ WCHAR *pwszRoutineName, DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; + STDMETHOD(SetVariableVariant)(THIS_ WCHAR *pwszVariableName, VARIANT varValue, BOOL fSetRef, DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; + STDMETHOD(GetVariableVariant)(THIS_ WCHAR *pwszVariableName, VARIANT *pvarValue, DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; + STDMETHOD(SetVariableNumber)(THIS_ WCHAR *pwszVariableName, LONG lValue, DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; + STDMETHOD(GetVariableNumber)(THIS_ WCHAR *pwszVariableName, LONG *plValue, DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; + STDMETHOD(SetVariableObject)(THIS_ WCHAR *pwszVariableName, IUnknown *punkValue, DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; + STDMETHOD(GetVariableObject)(THIS_ WCHAR *pwszVariableName, REFIID riid, LPVOID *ppv, DMUS_SCRIPT_ERRORINFO *pErrorInfo) PURE; + STDMETHOD(EnumRoutine)(THIS_ DWORD dwIndex, WCHAR *pwszName) PURE; + STDMETHOD(EnumVariable)(THIS_ DWORD dwIndex, WCHAR *pwszName) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicScript_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicScript_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicScript_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicScript methods ***/ +#define IDirectMusicPatternTrack_Init(p,a,b) (p)->lpVtbl->Init(p,a,b) +#define IDirectMusicPatternTrack_CallRoutine(p,a,b) (p)->lpVtbl->CallRoutine(p,a,b) +#define IDirectMusicPatternTrack_SetVariableVariant(p,a,b,c,d) (p)->lpVtbl->SetVariableVariant(p,a,b,c,d) +#define IDirectMusicPatternTrack_GetVariableVariant(p,a,b,c) (p)->lpVtbl->GetVariableVariant(p,a,b,c) +#define IDirectMusicPatternTrack_SetVariableNumber(p,a,b,c) (p)->lpVtbl->SetVariableNumber(p,a,b,c) +#define IDirectMusicPatternTrack_GetVariableNumber(p,a,b,c) (p)->lpVtbl->GetVariableNumber(p,a,b,c) +#define IDirectMusicPatternTrack_SetVariableObject(p,a,b,c) (p)->lpVtbl->SetVariableObject(p,a,b,c) +#define IDirectMusicPatternTrack_GetVariableObject(p,a,b,c,d) (p)->lpVtbl->GetVariableObject(p,a,b,c,d) +#define IDirectMusicPatternTrack_EnumRoutine(p,a,b) (p)->lpVtbl->EnumRoutine(p,a,b) +#define IDirectMusicPatternTrack_EnumVariable(p,a,b) (p)->lpVtbl->EnumVariable(p,a,b) +#endif + + +/***************************************************************************** + * IDirectMusicContainer interface + */ +#define INTERFACE IDirectMusicContainer +DECLARE_INTERFACE_(IDirectMusicContainer,IUnknown) +{ + /*** IUnknown methods ***/ + STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + /*** IDirectMusicContainer methods ***/ + STDMETHOD(EnumObject)(THIS_ REFGUID rguidClass, DWORD dwIndex, LPDMUS_OBJECTDESC pDesc, WCHAR *pwszAlias) PURE; +}; +#undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +/*** IUnknown methods ***/ +#define IDirectMusicContainer_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b) +#define IDirectMusicContainer_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicContainer_Release(p) (p)->lpVtbl->Release(p) +/*** IDirectMusicContainer methods ***/ +#define IDirectMusicContainer_EnumObject(p,a,b,c,d) (p)->lpVtbl->EnumObject(p,a,b,c,d) +#endif + + +#ifdef __cplusplus +} +#endif + +#include + +#endif /* __WINE_DMUSIC_PERFORMANCE_H */ diff --git a/reactos/include/dxsdk/dmusics.h b/reactos/include/dxsdk/dmusics.h index 90c6d57681c..402707f2146 100644 --- a/reactos/include/dxsdk/dmusics.h +++ b/reactos/include/dxsdk/dmusics.h @@ -9,11 +9,6 @@ interface IDirectMusicSynth; interface IDirectMusicSynthSink; -#ifndef __cplusplus - typedef interface IDirectMusicSynth IDirectMusicSynth; - typedef interface IDirectMusicSynthSink IDirectMusicSynthSink; -#endif - #ifndef _DMUS_VOICE_STATE_DEFINED #define _DMUS_VOICE_STATE_DEFINED @@ -52,16 +47,38 @@ DECLARE_INTERFACE_(IDirectMusicSynth, IUnknown) STDMETHOD(SetMasterClock) (THIS_ IReferenceClock *pClock) PURE; STDMETHOD(GetLatencyClock) (THIS_ IReferenceClock **ppClock) PURE; STDMETHOD(Activate) (THIS_ BOOL fEnable) PURE; - STDMETHOD(SetSynthSink) (THIS_ IDirectMusicSynthSink *pSynthSink) PURE; + STDMETHOD(SetSynthSink) (THIS_ struct IDirectMusicSynthSink *pSynthSink) PURE; STDMETHOD(Render) (THIS_ short *pBuffer, DWORD dwLength, LONGLONG llPosition) PURE; STDMETHOD(SetChannelPriority) (THIS_ DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority) PURE; STDMETHOD(GetChannelPriority) (THIS_ DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority) PURE; STDMETHOD(GetFormat) (THIS_ LPWAVEFORMATEX pWaveFormatEx, LPDWORD pdwWaveFormatExSize) PURE; STDMETHOD(GetAppend) (THIS_ DWORD* pdwAppend) PURE; }; - #undef INTERFACE +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectMusicSynth_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) +#define IDirectMusicSynth_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicSynth_Release(p) (p)->lpVtbl->Release(p) +#define IDirectMusicSynth_Open(p, a) (p)->lpVtbl->Open(p, a) +#define IDirectMusicSynth_Close(p) (p)->lpVtbl->Close(p) +#define IDirectMusicSynth_SetNumChannelGroups(p, a) (p)->lpVtbl->SetNumChannelGroups(p, a) +#define IDirectMusicSynth_Download(p, a, b, c) (p)->lpVtbl->Download(p, a, b, c) +#define IDirectMusicSynth_Unload(p, a, b, c) (p)->lpVtbl->Unload(p, a, b, c) +#define IDirectMusicSynth_PlayBuffer(p, a, b, c) (p)->lpVtbl->PlayBuffer(p, a, b, c) +#define IDirectMusicSynth_GetRunningStats(p, a) (p)->lpVtbl->GetRunningStats(p, a) +#define IDirectMusicSynth_GetPortCaps(p, a) (p)->lpVtbl->GetPortCaps(p, a) +#define IDirectMusicSynth_SetMasterClock(p, a) (p)->lpVtbl->SetMasterClock((p, a) +#define IDirectMusicSynth_GetLatencyClock(p, a) (p)->lpVtbl->GetLatencyClock(p, a) +#define IDirectMusicSynth_Activate(p, a) (p)->lpVtbl->Activate((p, a) +#define IDirectMusicSynth_SetSynthSink(p, a) (p)->lpVtbl->SetSynthSink(p, a) +#define IDirectMusicSynth_Render(p, a, b, c) (p)->lpVtbl->Render(p, a, b, c) +#define IDirectMusicSynth_SetChannelPriority(p, a, b, c) (p)->lpVtbl->SetChannelPriority(p, a, b, c) +#define IDirectMusicSynth_GetChannelPriority(p, a, b, c) (p)->lpVtbl->GetChannelPriority(p, a, b, c) +#define IDirectMusicSynth_GetFormat(p, a, b) (p)->lpVtbl->GetFormat(p, a, b) +#define IDirectMusicSynth_GetAppend(p, a) (p)->lpVtbl->GetAppend(p, a) +#endif + #define INTERFACE IDirectMusicSynth8 DECLARE_INTERFACE_(IDirectMusicSynth8, IDirectMusicSynth) { @@ -79,7 +96,7 @@ DECLARE_INTERFACE_(IDirectMusicSynth8, IDirectMusicSynth) STDMETHOD(SetMasterClock) (THIS_ IReferenceClock *pClock) PURE; STDMETHOD(GetLatencyClock) (THIS_ IReferenceClock **ppClock) PURE; STDMETHOD(Activate) (THIS_ BOOL fEnable) PURE; - STDMETHOD(SetSynthSink) (THIS_ IDirectMusicSynthSink *pSynthSink) PURE; + STDMETHOD(SetSynthSink) (THIS_ struct IDirectMusicSynthSink *pSynthSink) PURE; STDMETHOD(Render) (THIS_ short *pBuffer, DWORD dwLength, LONGLONG llPosition) PURE; STDMETHOD(SetChannelPriority) (THIS_ DWORD dwChannelGroup, DWORD dwChannel, DWORD dwPriority) PURE; STDMETHOD(GetChannelPriority) (THIS_ DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwPriority) PURE; @@ -91,8 +108,36 @@ DECLARE_INTERFACE_(IDirectMusicSynth8, IDirectMusicSynth) STDMETHOD(Refresh) (THIS_ DWORD dwDownloadID, DWORD dwFlags) PURE; STDMETHOD(AssignChannelToBuses) (THIS_ DWORD dwChannelGroup, DWORD dwChannel, LPDWORD pdwBuses, DWORD cBuses) PURE; }; - #undef INTERFACE + +#if !defined(__cplusplus) || defined(CINTERFACE) +#define IDirectMusicSynth8_QueryInterface(p, a, b) (p)->lpVtbl->QueryInterface(p, a, b) +#define IDirectMusicSynth8_AddRef(p) (p)->lpVtbl->AddRef(p) +#define IDirectMusicSynth8_Release(p) (p)->lpVtbl->Release(p) +#define IDirectMusicSynth8_Open(p, a) (p)->lpVtbl->Open(p, a) +#define IDirectMusicSynth8_Close(p) (p)->lpVtbl->Close(p) +#define IDirectMusicSynth8_SetNumChannelGroups(p, a) (p)->lpVtbl->SetNumChannelGroups(p, a) +#define IDirectMusicSynth8_Download(p, a, b, c) (p)->lpVtbl->Download(p, a, b, c) +#define IDirectMusicSynth8_Unload(p, a, b, c) (p)->lpVtbl->Unload(p, a, b, c) +#define IDirectMusicSynth8_PlayBuffer(p, a, b, c) (p)->lpVtbl->PlayBuffer(p, a, b, c) +#define IDirectMusicSynth8_GetRunningStats(p, a) (p)->lpVtbl->GetRunningStats(p, a) +#define IDirectMusicSynth8_GetPortCaps(p, a) (p)->lpVtbl->GetPortCaps(p, a) +#define IDirectMusicSynth8_SetMasterClock(p, a) (p)->lpVtbl->SetMasterClock((p, a) +#define IDirectMusicSynth8_GetLatencyClock(p, a) (p)->lpVtbl->GetLatencyClock(p, a) +#define IDirectMusicSynth8_Activate(p, a) (p)->lpVtbl->Activate((p, a) +#define IDirectMusicSynth8_SetSynthSink(p, a) (p)->lpVtbl->SetSynthSink(p, a) +#define IDirectMusicSynth8_Render(p, a, b, c) (p)->lpVtbl->Render(p, a, b, c) +#define IDirectMusicSynth8_SetChannelPriority(p, a, b, c) (p)->lpVtbl->SetChannelPriority(p, a, b, c) +#define IDirectMusicSynth8_GetChannelPriority(p, a, b, c) (p)->lpVtbl->GetChannelPriority(p, a, b, c) +#define IDirectMusicSynth8_GetFormat(p, a, b) (p)->lpVtbl->GetFormat(p, a, b) +#define IDirectMusicSynth8_GetAppend(p, a) (p)->lpVtbl->GetAppend(p, a) +#define IDirectMusicSynth8_PlayVoice(p, a, b, c, d, e, f, g, h, i, j) (p)->lpVtbl->PlayVoice(p, a, b, c, d, e, f, g, h, i, j) +#define IDirectMusicSynth8_StopVoice(p, a, b) (p)->lpVtbl->StopVoice(p, a, b) +#define IDirectMusicSynth8_GetVoiceState(p, a, b, c) (p)->lpVtbl->GetVoiceState(p, a, b, c) +#define IDirectMusicSynth8_Refresh(p, a, b) (p)->lpVtbl->Refresh(p, a, b) +#define IDirectMusicSynth8_AssignChannelToBuses(p, a, b, c, d) (p)->lpVtbl->AssignChannelToBuses(p, a, b, c, d) +#endif + #define INTERFACE IDirectMusicSynthSink DECLARE_INTERFACE_(IDirectMusicSynthSink, IUnknown) {