DirectMusic.pas
上传用户:hylc_2004
上传日期:2014-01-23
资源大小:46800k
文件大小:340k
- {******************************************************************************}
- {* *}
- {* Copyright (C) Microsoft Corporation. All Rights Reserved. *}
- {* *}
- {* Files: dls1.h dls2.h dmdls.h dmerror.h dmksctrl.h dmplugin.h *}
- {* dmusicc.h dmusici.h dmusicf.h dmusbuff.h *}
- {* Content: DirectMusic include files *}
- {* *}
- {* DirectX 9.0 Delphi adaptation by Alexey Barkovoy *}
- {* E-Mail: clootie@reactor.ru *}
- {* *}
- {* Modified: 27-Apr-2003 *}
- {* *}
- {* Based upon : *}
- {* DirectX 7.0 Delphi adaptation by Erik Unger *}
- {* DirectX 8.0 Delphi adaptation by Ivo Steinmann *}
- {* *}
- {* Latest version can be downloaded from: *}
- {* http://clootie.narod.ru/delphi *}
- {* *}
- {******************************************************************************}
- { }
- { Obtained through: Joint Endeavour of Delphi Innovators (Project JEDI) }
- { }
- { The contents of this file are used with permission, subject to the Mozilla }
- { Public License Version 1.1 (the "License"); you may not use this file except }
- { in compliance with the License. You may obtain a copy of the License at }
- { http://www.mozilla.org/MPL/MPL-1.1.html }
- { }
- { Software distributed under the License is distributed on an "AS IS" basis, }
- { WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for }
- { the specific language governing rights and limitations under the License. }
- { }
- { Alternatively, the contents of this file may be used under the terms of the }
- { GNU Lesser General Public License (the "LGPL License"), in which case the }
- { provisions of the LGPL License are applicable instead of those above. }
- { If you wish to allow use of your version of this file only under the terms }
- { of the LGPL License and not to allow others to use your version of this file }
- { under the MPL, indicate your decision by deleting the provisions above and }
- { replace them with the notice and other provisions required by the LGPL }
- { License. If you do not delete the provisions above, a recipient may use }
- { your version of this file under either the MPL or the LGPL License. }
- { }
- { For more information about the LGPL: http://www.gnu.org/copyleft/lesser.html }
- { }
- {******************************************************************************}
- {$I DirectX.inc}
- {$MINENUMSIZE 1}
- unit DirectMusic;
- interface
- (*$HPPEMIT '#include "ks.h"' *)
- (*$HPPEMIT '#include "dls1.h"' *)
- (*$HPPEMIT '#include "dls2.h"' *)
- (*$HPPEMIT '#include "dmdls.h"' *)
- (*$HPPEMIT '#include "dmerror.h"' *)
- (*$HPPEMIT '#include "dmplugin.h"' *)
- (*$HPPEMIT '#include "dmusicc.h"' *)
- (*$HPPEMIT '#include "dmusici.h"' *)
- (*$HPPEMIT '#include "dmusicf.h"' *)
- (*$HPPEMIT '#include "dmusbuff.h"' *)
- {$NOINCLUDE ActiveX}
- uses
- Windows, MMSystem, ActiveX, DirectSound;
- (*==========================================================================;
- //
- // dls1.h
- //
- //
- // Description:
- //
- // Interface defines and structures for the Instrument Collection Form
- // RIFF DLS.
- //
- //
- // Written by Sonic Foundry 1996. Released for public use.
- //
- //=========================================================================*)
- (*)/////////////////////////////////////////////////////////////////////////
- //
- //
- // Layout of an instrument collection:
- //
- //
- // RIFF [] 'DLS ' [dlid,colh,INSTLIST,WAVEPOOL,INFOLIST]
- //
- // INSTLIST
- // LIST [] 'lins'
- // LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
- // LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
- // LIST [] 'ins ' [dlid,insh,RGNLIST,ARTLIST,INFOLIST]
- //
- // RGNLIST
- // LIST [] 'lrgn'
- // LIST [] 'rgn ' [rgnh,wsmp,wlnk,ARTLIST]
- // LIST [] 'rgn ' [rgnh,wsmp,wlnk,ARTLIST]
- // LIST [] 'rgn ' [rgnh,wsmp,wlnk,ARTLIST]
- //
- // ARTLIST
- // LIST [] 'lart'
- // 'art1' level 1 Articulation connection graph
- // 'art2' level 2 Articulation connection graph
- // '3rd1' Possible 3rd party articulation structure 1
- // '3rd2' Possible 3rd party articulation structure 2 .... and so on
- //
- // WAVEPOOL
- // ptbl [] [pool table]
- // LIST [] 'wvpl'
- // [path],
- // [path],
- // LIST [] 'wave' [dlid,RIFFWAVE]
- // LIST [] 'wave' [dlid,RIFFWAVE]
- // LIST [] 'wave' [dlid,RIFFWAVE]
- // LIST [] 'wave' [dlid,RIFFWAVE]
- // LIST [] 'wave' [dlid,RIFFWAVE]
- //
- // INFOLIST
- // LIST [] 'INFO'
- // 'icmt' 'One of those crazy comments.'
- // 'icop' 'Copyright (C) 1996 Sonic Foundry'
- //
- ////////////////////////////////////////////////////////////////////////(*)
- (*)////////////////////////////////////////////////////////////////////////
- // FOURCC's used in the DLS file
- ////////////////////////////////////////////////////////////////////////(*)
- const
- FOURCC_DLS = DWORD(Byte('D') or (Byte('L') shl 8) or (Byte('S') shl 16) or (Byte(' ') shl 24));
- {$EXTERNALSYM FOURCC_DLS}
- FOURCC_DLID = DWORD(Byte('d') or (Byte('l') shl 8) or (Byte('i') shl 16) or (Byte('d') shl 24));
- {$EXTERNALSYM FOURCC_DLID}
- FOURCC_COLH = DWORD(Byte('c') or (Byte('o') shl 8) or (Byte('l') shl 16) or (Byte('h') shl 24));
- {$EXTERNALSYM FOURCC_COLH}
- FOURCC_WVPL = DWORD(Byte('w') or (Byte('v') shl 8) or (Byte('p') shl 16) or (Byte('l') shl 24));
- {$EXTERNALSYM FOURCC_WVPL}
- FOURCC_PTBL = DWORD(Byte('p') or (Byte('t') shl 8) or (Byte('b') shl 16) or (Byte('l') shl 24));
- {$EXTERNALSYM FOURCC_PTBL}
- FOURCC_PATH = DWORD(Byte('p') or (Byte('a') shl 8) or (Byte('t') shl 16) or (Byte('h') shl 24));
- {$EXTERNALSYM FOURCC_PATH}
- FOURCC_wave = DWORD(Byte('w') or (Byte('a') shl 8) or (Byte('v') shl 16) or (Byte('e') shl 24));
- {$EXTERNALSYM FOURCC_wave}
- FOURCC_LINS = DWORD(Byte('l') or (Byte('i') shl 8) or (Byte('n') shl 16) or (Byte('s') shl 24));
- {$EXTERNALSYM FOURCC_LINS}
- FOURCC_INS = DWORD(Byte('i') or (Byte('n') shl 8) or (Byte('s') shl 16) or (Byte(' ') shl 24));
- {$EXTERNALSYM FOURCC_INS}
- FOURCC_INSH = DWORD(Byte('i') or (Byte('n') shl 8) or (Byte('s') shl 16) or (Byte('h') shl 24));
- {$EXTERNALSYM FOURCC_INSH}
- FOURCC_LRGN = DWORD(Byte('l') or (Byte('r') shl 8) or (Byte('g') shl 16) or (Byte('n') shl 24));
- {$EXTERNALSYM FOURCC_LRGN}
- FOURCC_RGN = DWORD(Byte('r') or (Byte('g') shl 8) or (Byte('n') shl 16) or (Byte(' ') shl 24));
- {$EXTERNALSYM FOURCC_RGN}
- FOURCC_RGNH = DWORD(Byte('r') or (Byte('g') shl 8) or (Byte('n') shl 16) or (Byte('h') shl 24));
- {$EXTERNALSYM FOURCC_RGNH}
- FOURCC_LART = DWORD(Byte('l') or (Byte('a') shl 8) or (Byte('r') shl 16) or (Byte('t') shl 24));
- {$EXTERNALSYM FOURCC_LART}
- FOURCC_ART1 = DWORD(Byte('a') or (Byte('r') shl 8) or (Byte('t') shl 16) or (Byte('1') shl 24));
- {$EXTERNALSYM FOURCC_ART1}
- FOURCC_WLNK = DWORD(Byte('w') or (Byte('l') shl 8) or (Byte('n') shl 16) or (Byte('k') shl 24));
- {$EXTERNALSYM FOURCC_WLNK}
- FOURCC_WSMP = DWORD(Byte('w') or (Byte('s') shl 8) or (Byte('m') shl 16) or (Byte('p') shl 24));
- {$EXTERNALSYM FOURCC_WSMP}
- FOURCC_VERS = DWORD(Byte('v') or (Byte('e') shl 8) or (Byte('r') shl 16) or (Byte('s') shl 24));
- {$EXTERNALSYM FOURCC_VERS}
- (*)////////////////////////////////////////////////////////////////////////
- // Articulation connection graph definitions
- ////////////////////////////////////////////////////////////////////////(*)
- // Generic Sources
- CONN_SRC_NONE = $0000;
- {$EXTERNALSYM CONN_SRC_NONE}
- CONN_SRC_LFO = $0001;
- {$EXTERNALSYM CONN_SRC_LFO}
- CONN_SRC_KEYONVELOCITY = $0002;
- {$EXTERNALSYM CONN_SRC_KEYONVELOCITY}
- CONN_SRC_KEYNUMBER = $0003;
- {$EXTERNALSYM CONN_SRC_KEYNUMBER}
- CONN_SRC_EG1 = $0004;
- {$EXTERNALSYM CONN_SRC_EG1}
- CONN_SRC_EG2 = $0005;
- {$EXTERNALSYM CONN_SRC_EG2}
- CONN_SRC_PITCHWHEEL = $0006;
- {$EXTERNALSYM CONN_SRC_PITCHWHEEL}
- // Midi Controllers 0-127
- CONN_SRC_CC1 = $0081;
- {$EXTERNALSYM CONN_SRC_CC1}
- CONN_SRC_CC7 = $0087;
- {$EXTERNALSYM CONN_SRC_CC7}
- CONN_SRC_CC10 = $008a;
- {$EXTERNALSYM CONN_SRC_CC10}
- CONN_SRC_CC11 = $008b;
- {$EXTERNALSYM CONN_SRC_CC11}
- // Generic Destinations
- CONN_DST_NONE = $0000;
- {$EXTERNALSYM CONN_DST_NONE}
- CONN_DST_ATTENUATION = $0001;
- {$EXTERNALSYM CONN_DST_ATTENUATION}
- CONN_DST_PITCH = $0003;
- {$EXTERNALSYM CONN_DST_PITCH}
- CONN_DST_PAN = $0004;
- {$EXTERNALSYM CONN_DST_PAN}
- // LFO Destinations
- CONN_DST_LFO_FREQUENCY = $0104;
- {$EXTERNALSYM CONN_DST_LFO_FREQUENCY}
- CONN_DST_LFO_STARTDELAY = $0105;
- {$EXTERNALSYM CONN_DST_LFO_STARTDELAY}
- // EG1 Destinations
- CONN_DST_EG1_ATTACKTIME = $0206;
- {$EXTERNALSYM CONN_DST_EG1_ATTACKTIME}
- CONN_DST_EG1_DECAYTIME = $0207;
- {$EXTERNALSYM CONN_DST_EG1_DECAYTIME}
- CONN_DST_EG1_RELEASETIME = $0209;
- {$EXTERNALSYM CONN_DST_EG1_RELEASETIME}
- CONN_DST_EG1_SUSTAINLEVEL = $020a;
- {$EXTERNALSYM CONN_DST_EG1_SUSTAINLEVEL}
- // EG2 Destinations
- CONN_DST_EG2_ATTACKTIME = $030a;
- {$EXTERNALSYM CONN_DST_EG2_ATTACKTIME}
- CONN_DST_EG2_DECAYTIME = $030b;
- {$EXTERNALSYM CONN_DST_EG2_DECAYTIME}
- CONN_DST_EG2_RELEASETIME = $030d;
- {$EXTERNALSYM CONN_DST_EG2_RELEASETIME}
- CONN_DST_EG2_SUSTAINLEVEL = $030e;
- {$EXTERNALSYM CONN_DST_EG2_SUSTAINLEVEL}
- CONN_TRN_NONE = $0000;
- {$EXTERNALSYM CONN_TRN_NONE}
- CONN_TRN_CONCAVE = $0001;
- {$EXTERNALSYM CONN_TRN_CONCAVE}
- type
- PDLSID = ^TDLSID;
- _DLSID = packed record
- ulData1: Cardinal;
- usData2: Word;
- usData3: Word;
- abData4: array[0..7] of Byte;
- end;
- {$EXTERNALSYM _DLSID}
- DLSID = _DLSID;
- {$EXTERNALSYM DLSID}
- TDLSID= _DLSID;
- PDLSVersion = ^TDLSVersion;
- _DLSVERSION = packed record
- dwVersionMS: DWORD;
- dwVersionLS: DWORD;
- end;
- {$EXTERNALSYM _DLSVERSION}
- DLSVERSION = _DLSVERSION;
- {$EXTERNALSYM DLSVERSION}
- TDLSVersion = _DLSVERSION;
- PConnection = ^TConnection;
- _CONNECTION = packed record
- usSource: Word;
- usControl: Word;
- usDestination: Word;
- usTransform: Word;
- lScale: Longint;
- end;
- {$EXTERNALSYM _CONNECTION}
- CONNECTION = _CONNECTION;
- {$EXTERNALSYM CONNECTION}
- TConnection = _CONNECTION;
- // Level 1 Articulation Data
- PConnectionList = ^TConnectionList;
- _CONNECTIONLIST = packed record
- cbSize: Cardinal; // size of the connection list structure
- cConnections: Cardinal; // count of connections in the list
- end;
- {$EXTERNALSYM _CONNECTIONLIST}
- CONNECTIONLIST = _CONNECTIONLIST;
- {$EXTERNALSYM CONNECTIONLIST}
- TConnectionList = _CONNECTIONLIST;
- (*)////////////////////////////////////////////////////////////////////////
- // Generic type defines for regions and instruments
- ////////////////////////////////////////////////////////////////////////(*)
- PRGNRange = ^TRGNRange;
- _RGNRANGE = packed record
- usLow: Word;
- usHigh: Word;
- end;
- {$EXTERNALSYM _RGNRANGE}
- RGNRANGE = _RGNRANGE;
- {$EXTERNALSYM RGNRANGE}
- TRGNRange = _RGNRANGE;
- const
- F_INSTRUMENT_DRUMS = $80000000;
- {$EXTERNALSYM F_INSTRUMENT_DRUMS}
- type
- PMIDILocale = ^TMIDILocale;
- _MIDILOCALE = packed record
- ulBank: Cardinal;
- ulInstrument: Cardinal;
- end;
- {$EXTERNALSYM _MIDILOCALE}
- MIDILOCALE = _MIDILOCALE;
- {$EXTERNALSYM MIDILOCALE}
- TMIDILocale = _MIDILOCALE;
- (*)////////////////////////////////////////////////////////////////////////
- // Header structures found in an DLS file for collection, instruments, and
- // regions.
- ////////////////////////////////////////////////////////////////////////(*)
- const
- F_RGN_OPTION_SELFNONEXCLUSIVE = $0001;
- {$EXTERNALSYM F_RGN_OPTION_SELFNONEXCLUSIVE}
- type
- PRGNHeader = ^TRGNHeader;
- _RGNHEADER = packed record
- RangeKey: TRGNRange; // Key range
- RangeVelocity: TRGNRange; // Velocity Range
- fusOptions: Word; // Synthesis options for this range
- usKeyGroup: Word; // Key grouping for non simultaneous play
- // 0 = no group, 1 up is group
- // for Level 1 only groups 1-15 are allowed
- end;
- {$EXTERNALSYM _RGNHEADER}
- RGNHEADER = _RGNHEADER;
- {$EXTERNALSYM RGNHEADER}
- TRGNHeader = _RGNHEADER;
- PInstHeader = ^TInstHeader;
- _INSTHEADER = packed record
- cRegions: Cardinal; // Count of regions in this instrument
- Locale: TMIDILocale; // Intended MIDI locale of this instrument
- end;
- {$EXTERNALSYM _INSTHEADER}
- INSTHEADER = _INSTHEADER;
- {$EXTERNALSYM INSTHEADER}
- TInstHeader = _INSTHEADER;
- PDLSHeader = ^TDLSHeader;
- _DLSHEADER = packed record
- cInstruments: Cardinal; // Count of instruments in the collection
- end;
- {$EXTERNALSYM _DLSHEADER}
- DLSHEADER = _DLSHEADER;
- {$EXTERNALSYM DLSHEADER}
- TDLSHeader = _DLSHEADER;
- (*)///////////////////////////////////////////////////////////////////////////
- // definitions for the Wave link structure
- ///////////////////////////////////////////////////////////////////////////(*)
- // **** For level 1 only WAVELINK_CHANNEL_MONO is valid ****
- // ulChannel allows for up to 32 channels of audio with each bit position
- // specifiying a channel of playback
- const
- WAVELINK_CHANNEL_LEFT = $0001;
- {$EXTERNALSYM WAVELINK_CHANNEL_LEFT}
- WAVELINK_CHANNEL_RIGHT = $0002;
- {$EXTERNALSYM WAVELINK_CHANNEL_RIGHT}
- F_WAVELINK_PHASE_MASTER = $0001;
- {$EXTERNALSYM F_WAVELINK_PHASE_MASTER}
- type
- PWaveLink = ^TWaveLink;
- _WAVELINK = packed record // any paths or links are stored right after struct
- fusOptions: Word; // options flags for this wave
- usPhaseGroup: Word; // Phase grouping for locking channels
- ulChannel: Cardinal; // channel placement
- ulTableIndex: Cardinal; // index into the wave pool table, 0 based
- end;
- {$EXTERNALSYM _WAVELINK}
- WAVELINK = _WAVELINK;
- {$EXTERNALSYM WAVELINK}
- TWaveLink = _WAVELINK;
- const
- POOL_CUE_NULL = $ffffffff;
- {$EXTERNALSYM POOL_CUE_NULL}
- type
- PPoolCUE = ^TPoolCUE;
- _POOLCUE = packed record
- ulOffset: Cardinal; // Offset to the entry in the list
- end;
- {$EXTERNALSYM _POOLCUE}
- POOLCUE = _POOLCUE;
- {$EXTERNALSYM POOLCUE}
- TPoolCUE = _POOLCUE;
- PPoolTable = ^TPoolTable;
- _POOLTABLE = packed record
- cbSize: Cardinal; // size of the pool table structure
- cCues: Cardinal; // count of cues in the list
- end;
- {$EXTERNALSYM _POOLTABLE}
- POOLTABLE = _POOLTABLE;
- {$EXTERNALSYM POOLTABLE}
- TPoolTable = _POOLTABLE;
- (*)///////////////////////////////////////////////////////////////////////////
- // Structures for the "wsmp" chunk
- ///////////////////////////////////////////////////////////////////////////(*)
- const
- F_WSMP_NO_TRUNCATION = $0001;
- {$EXTERNALSYM F_WSMP_NO_TRUNCATION}
- F_WSMP_NO_COMPRESSION = $0002;
- {$EXTERNALSYM F_WSMP_NO_COMPRESSION}
- type
- PWSMPL = ^TWSMPL;
- _rwsmp = packed record
- cbSize: Cardinal;
- usUnityNote: Word; // MIDI Unity Playback Note
- sFineTune: SmallInt; // Fine Tune in log tuning
- lAttenuation: Longint; // Overall Attenuation to be applied to data
- fulOptions: Cardinal; // Flag options
- cSampleLoops: Cardinal; // Count of Sample loops, 0 loops is one shot
- end;
- {$EXTERNALSYM _rwsmp}
- WSMPL = _rwsmp;
- {$EXTERNALSYM WSMPL}
- TWSMPL = _rwsmp;
- // This loop type is a normal forward playing loop which is continually
- // played until the envelope reaches an off threshold in the release
- // portion of the volume envelope
- const
- WLOOP_TYPE_FORWARD = 0;
- {$EXTERNALSYM WLOOP_TYPE_FORWARD}
- type
- PWLoop = ^TWLoop;
- _rloop = packed record
- cbSize: Cardinal;
- ulType: Cardinal; // Loop Type
- ulStart: Cardinal; // Start of loop in samples
- ulLength: Cardinal; // Length of loop in samples
- end;
- {$EXTERNALSYM _rloop}
- WLOOP = _rloop;
- {$EXTERNALSYM WLOOP}
- TWLoop = _rloop;
- (*
- dls2.h
- Description:
- Interface defines and structures for the DLS2 extensions of DLS.
- Written by Microsoft 1998. Released for public use.
- *)
- (*
- FOURCC's used in the DLS2 file, in addition to DLS1 chunks
- *)
- const
- FOURCC_RGN2 = DWORD(Byte('r') or (Byte('g') shl 8) or (Byte('n') shl 16) or (Byte('2') shl 24));
- {$EXTERNALSYM FOURCC_RGN2}
- FOURCC_LAR2 = DWORD(Byte('l') or (Byte('a') shl 8) or (Byte('r') shl 16) or (Byte('2') shl 24));
- {$EXTERNALSYM FOURCC_LAR2}
- FOURCC_ART2 = DWORD(Byte('a') or (Byte('r') shl 8) or (Byte('t') shl 16) or (Byte('2') shl 24));
- {$EXTERNALSYM FOURCC_ART2}
- FOURCC_CDL = DWORD(Byte('c') or (Byte('d') shl 8) or (Byte('l') shl 16) or (Byte(' ') shl 24));
- {$EXTERNALSYM FOURCC_CDL}
- // FOURCC_DLID = DWORD(Byte('d') or (Byte('l') shl 8) or (Byte('i') shl 16) or (Byte('d') shl 24)); //Already defined above
- (*
- Articulation connection graph definitions. These are in addition to
- the definitions in the DLS1 header.
- *)
- // Generic Sources (in addition to DLS1 sources.
- CONN_SRC_POLYPRESSURE = $0007; // Polyphonic Pressure
- {$EXTERNALSYM CONN_SRC_POLYPRESSURE}
- CONN_SRC_CHANNELPRESSURE = $0008; // Channel Pressure
- {$EXTERNALSYM CONN_SRC_CHANNELPRESSURE}
- CONN_SRC_VIBRATO = $0009; // Vibrato LFO
- {$EXTERNALSYM CONN_SRC_VIBRATO}
- CONN_SRC_MONOPRESSURE = $000a; // MIDI Mono pressure
- {$EXTERNALSYM CONN_SRC_MONOPRESSURE}
- // Midi Controllers
- CONN_SRC_CC91 = $00db; // Reverb Send
- {$EXTERNALSYM CONN_SRC_CC91}
- CONN_SRC_CC93 = $00dd; // Chorus Send
- {$EXTERNALSYM CONN_SRC_CC93}
- (* Generic Destinations *)
- CONN_DST_GAIN = $0001; // Same as CONN_DST_ ATTENUATION, but more appropriate terminology.
- {$EXTERNALSYM CONN_DST_GAIN}
- CONN_DST_KEYNUMBER = $0005; // Key Number Generator
- {$EXTERNALSYM CONN_DST_KEYNUMBER}
- // Audio Channel Output Destinations
- CONN_DST_LEFT = $0010; // Left Channel Send
- {$EXTERNALSYM CONN_DST_LEFT}
- CONN_DST_RIGHT = $0011; // Right Channel Send
- {$EXTERNALSYM CONN_DST_RIGHT}
- CONN_DST_CENTER = $0012; // Center Channel Send
- {$EXTERNALSYM CONN_DST_CENTER}
- CONN_DST_LEFTREAR = $0013; // Left Rear Channel Send
- {$EXTERNALSYM CONN_DST_LEFTREAR}
- CONN_DST_RIGHTREAR = $0014; // Right Rear Channel Send
- {$EXTERNALSYM CONN_DST_RIGHTREAR}
- CONN_DST_LFE_CHANNEL = $0015; // LFE Channel Send
- {$EXTERNALSYM CONN_DST_LFE_CHANNEL}
- CONN_DST_CHORUS = $0080; // Chorus Send
- {$EXTERNALSYM CONN_DST_CHORUS}
- CONN_DST_REVERB = $0081; // Reverb Send
- {$EXTERNALSYM CONN_DST_REVERB}
- // Vibrato LFO Destinations
- CONN_DST_VIB_FREQUENCY = $0114; // Vibrato Frequency
- {$EXTERNALSYM CONN_DST_VIB_FREQUENCY}
- CONN_DST_VIB_STARTDELAY = $0115; // Vibrato Start Delay
- {$EXTERNALSYM CONN_DST_VIB_STARTDELAY}
- // EG1 Destinations
- CONN_DST_EG1_DELAYTIME = $020B; // EG1 Delay Time
- {$EXTERNALSYM CONN_DST_EG1_DELAYTIME}
- CONN_DST_EG1_HOLDTIME = $020C; // EG1 Hold Time
- {$EXTERNALSYM CONN_DST_EG1_HOLDTIME}
- CONN_DST_EG1_SHUTDOWNTIME = $020D; // EG1 Shutdown Time
- {$EXTERNALSYM CONN_DST_EG1_SHUTDOWNTIME}
- // EG2 Destinations
- CONN_DST_EG2_DELAYTIME = $030F; // EG2 Delay Time
- {$EXTERNALSYM CONN_DST_EG2_DELAYTIME}
- CONN_DST_EG2_HOLDTIME = $0310; // EG2 Hold Time
- {$EXTERNALSYM CONN_DST_EG2_HOLDTIME}
- // Filter Destinations
- CONN_DST_FILTER_CUTOFF = $0500; // Filter Cutoff Frequency
- {$EXTERNALSYM CONN_DST_FILTER_CUTOFF}
- CONN_DST_FILTER_Q = $0501; // Filter Resonance
- {$EXTERNALSYM CONN_DST_FILTER_Q}
- // Transforms
- CONN_TRN_CONVEX = $0002; // Convex Transform
- {$EXTERNALSYM CONN_TRN_CONVEX}
- CONN_TRN_SWITCH = $0003; // Switch Transform
- {$EXTERNALSYM CONN_TRN_SWITCH}
- // Conditional chunk operators
- DLS_CDL_AND = $0001;// X = X & Y
- {$EXTERNALSYM DLS_CDL_AND}
- DLS_CDL_OR = $0002;// X = X | Y
- {$EXTERNALSYM DLS_CDL_OR}
- DLS_CDL_XOR = $0003;// X = X ^ Y
- {$EXTERNALSYM DLS_CDL_XOR}
- DLS_CDL_ADD = $0004;// X = X + Y
- {$EXTERNALSYM DLS_CDL_ADD}
- DLS_CDL_SUBTRACT = $0005;// X = X - Y
- {$EXTERNALSYM DLS_CDL_SUBTRACT}
- DLS_CDL_MULTIPLY = $0006;// X = X * Y
- {$EXTERNALSYM DLS_CDL_MULTIPLY}
- DLS_CDL_DIVIDE = $0007;// X = X / Y
- {$EXTERNALSYM DLS_CDL_DIVIDE}
- DLS_CDL_LOGICAL_AND = $0008;// X = X && Y
- {$EXTERNALSYM DLS_CDL_LOGICAL_AND}
- DLS_CDL_LOGICAL_OR = $0009;// X = X || Y
- {$EXTERNALSYM DLS_CDL_LOGICAL_OR}
- DLS_CDL_LT = $000A;// X = (X < Y)
- {$EXTERNALSYM DLS_CDL_LT}
- DLS_CDL_LE = $000B;// X = (X <= Y)
- {$EXTERNALSYM DLS_CDL_LE}
- DLS_CDL_GT = $000C;// X = (X > Y)
- {$EXTERNALSYM DLS_CDL_GT}
- DLS_CDL_GE = $000D;// X = (X >= Y)
- {$EXTERNALSYM DLS_CDL_GE}
- DLS_CDL_EQ = $000E;// X = (X == Y)
- {$EXTERNALSYM DLS_CDL_EQ}
- DLS_CDL_NOT = $000F;// X = !X
- {$EXTERNALSYM DLS_CDL_NOT}
- DLS_CDL_CONST = $0010;// 32-bit constant
- {$EXTERNALSYM DLS_CDL_CONST}
- DLS_CDL_QUERY = $0011;// 32-bit value returned from query
- {$EXTERNALSYM DLS_CDL_QUERY}
- DLS_CDL_QUERYSUPPORTED = $0012;// Test to see if query is supported by synth
- {$EXTERNALSYM DLS_CDL_QUERYSUPPORTED}
- (*
- Loop and release
- *)
- WLOOP_TYPE_RELEASE = 1;
- {$EXTERNALSYM WLOOP_TYPE_RELEASE}
- (*
- WaveLink chunk <wlnk-ck>
- *)
- F_WAVELINK_MULTICHANNEL = $0002;
- {$EXTERNALSYM F_WAVELINK_MULTICHANNEL}
- const
- (*
- DLSID queries for <cdl-ck>
- *)
- DLSID_GMInHardware: TGUID = '{178f2f24-c364-11d1-a760-0000f875ac12}';
- {$EXTERNALSYM DLSID_GMInHardware}
- DLSID_GSInHardware: TGUID = '{178f2f25-c364-11d1-a760-0000f875ac12}';
- {$EXTERNALSYM DLSID_GSInHardware}
- DLSID_XGInHardware: TGUID = '{178f2f26-c364-11d1-a760-0000f875ac12}';
- {$EXTERNALSYM DLSID_XGInHardware}
- DLSID_SupportsDLS1: TGUID = '{178f2f27-c364-11d1-a760-0000f875ac12}';
- {$EXTERNALSYM DLSID_SupportsDLS1}
- DLSID_SupportsDLS2: TGUID = '{f14599e5-4689-11d2-afa6-00aa0024d8b6}';
- {$EXTERNALSYM DLSID_SupportsDLS2}
- DLSID_SampleMemorySize: TGUID = '{178f2f28-c364-11d1-a760-0000f875ac12}';
- {$EXTERNALSYM DLSID_SampleMemorySize}
- DLSID_ManufacturersID: TGUID = '{b03e1181-8095-11d2-a1ef-00600833dbd8}';
- {$EXTERNALSYM DLSID_ManufacturersID}
- DLSID_ProductID: TGUID = '{b03e1182-8095-11d2-a1ef-00600833dbd8}';
- {$EXTERNALSYM DLSID_ProductID}
- DLSID_SamplePlaybackRate: TGUID = '{2a91f713-a4bf-11d2-bbdf-00600833dbd8}';
- {$EXTERNALSYM DLSID_SamplePlaybackRate}
- (************************************************************************
- * *
- * dmdls.h -- DLS download definitions for DirectMusic API's *
- * *
- * Copyright (c) Microsoft Corporation. All rights reserved. *
- * *
- ************************************************************************)
- type
- PCENT = Longint; (* Pitch cents *)
- {$EXTERNALSYM PCENT}
- GCENT = Longint; (* Gain cents *)
- {$EXTERNALSYM GCENT}
- TCENT = Longint; (* Time cents *)
- {$EXTERNALSYM TCENT}
- PERCENT = Longint; (* Per.. cent! *)
- {$EXTERNALSYM PERCENT}
- PReferenceTime = ^TReferenceTime;
- REFERENCE_TIME = LONGLONG;
- {$EXTERNALSYM REFERENCE_TIME}
- TReferenceTime = REFERENCE_TIME;
- PReference_Time = PReferenceTime;
- TReference_Time = TReferenceTime;
- PDMusDownloadInfo = ^TDMusDownloadInfo;
- _DMUS_DOWNLOADINFO = packed record
- dwDLType: DWORD; // Instrument or Wave
- dwDLId: DWORD; // Unique identifier to tag this download.
- dwNumOffsetTableEntries: DWORD; // Number of index in the offset address table.
- cbSize: DWORD; // Total size of this memory chunk.
- end;
- {$EXTERNALSYM _DMUS_DOWNLOADINFO}
- DMUS_DOWNLOADINFO = _DMUS_DOWNLOADINFO;
- {$EXTERNALSYM DMUS_DOWNLOADINFO}
- TDMusDownloadInfo = _DMUS_DOWNLOADINFO;
- const
- DMUS_DOWNLOADINFO_INSTRUMENT = 1;
- {$EXTERNALSYM DMUS_DOWNLOADINFO_INSTRUMENT}
- DMUS_DOWNLOADINFO_WAVE = 2;
- {$EXTERNALSYM DMUS_DOWNLOADINFO_WAVE}
- DMUS_DOWNLOADINFO_INSTRUMENT2 = 3; (* New version for better DLS2 support. *)
- {$EXTERNALSYM DMUS_DOWNLOADINFO_INSTRUMENT2}
- (* Support for oneshot and streaming wave data
- *)
- DMUS_DOWNLOADINFO_WAVEARTICULATION = 4; (* Wave articulation data *)
- {$EXTERNALSYM DMUS_DOWNLOADINFO_WAVEARTICULATION}
- DMUS_DOWNLOADINFO_STREAMINGWAVE = 5; (* One chunk of a streaming *)
- {$EXTERNALSYM DMUS_DOWNLOADINFO_STREAMINGWAVE}
- DMUS_DOWNLOADINFO_ONESHOTWAVE = 6;
- {$EXTERNALSYM DMUS_DOWNLOADINFO_ONESHOTWAVE}
- DMUS_DEFAULT_SIZE_OFFSETTABLE = 1;
- {$EXTERNALSYM DMUS_DEFAULT_SIZE_OFFSETTABLE}
- (* Flags for DMUS_INSTRUMENT's ulFlags member *)
- DMUS_INSTRUMENT_GM_INSTRUMENT = (1 shr 0);
- {$EXTERNALSYM DMUS_INSTRUMENT_GM_INSTRUMENT}
- type
- PDMusOffsetTable = ^TDMusOffsetTable;
- _DMUS_OFFSETTABLE = packed record
- ulOffsetTable: array[0..DMUS_DEFAULT_SIZE_OFFSETTABLE - 1] of Cardinal;
- end;
- {$EXTERNALSYM _DMUS_OFFSETTABLE}
- DMUS_OFFSETTABLE = _DMUS_OFFSETTABLE;
- {$EXTERNALSYM DMUS_OFFSETTABLE}
- TDMusOffsetTable = _DMUS_OFFSETTABLE;
- PDMusInstrument = ^TDMusInstrument;
- _DMUS_INSTRUMENT = packed record
- ulPatch: Cardinal;
- ulFirstRegionIdx: Cardinal;
- ulGlobalArtIdx: Cardinal; // If zero the instrument does not have an articulation
- ulFirstExtCkIdx: Cardinal; // If zero no 3rd party entenstion chunks associated with the instrument
- ulCopyrightIdx: Cardinal; // If zero no Copyright information associated with the instrument
- ulFlags: Cardinal;
- end;
- {$EXTERNALSYM _DMUS_INSTRUMENT}
- DMUS_INSTRUMENT = _DMUS_INSTRUMENT;
- {$EXTERNALSYM DMUS_INSTRUMENT}
- TDMusInstrument = _DMUS_INSTRUMENT;
- PDMusRegion = ^TDMusRegion;
- _DMUS_REGION = packed record
- RangeKey: TRGNRange;
- RangeVelocity: TRGNRange;
- fusOptions: Word;
- usKeyGroup: Word;
- ulRegionArtIdx: Cardinal; // If zero the region does not have an articulation
- ulNextRegionIdx: Cardinal; // If zero no more regions
- ulFirstExtCkIdx: Cardinal; // If zero no 3rd party entenstion chunks associated with the region
- WaveLink: TWaveLink;
- WSMP: TWSMPL; // If WSMP.cSampleLoops > 1 then a WLOOP is included
- WLOOP: array [0..0] of TWLoop;
- end;
- {$EXTERNALSYM _DMUS_REGION}
- DMUS_REGION = _DMUS_REGION;
- {$EXTERNALSYM DMUS_REGION}
- TDMusRegion = _DMUS_REGION;
- PDMusLFOParams = ^TDMusLFOParams;
- _DMUS_LFOPARAMS = packed record
- pcFrequency: PCENT;
- tcDelay: TCENT;
- gcVolumeScale: GCENT;
- pcPitchScale: PCENT;
- gcMWToVolume: GCENT;
- pcMWToPitch: PCENT;
- end;
- {$EXTERNALSYM _DMUS_LFOPARAMS}
- DMUS_LFOPARAMS = _DMUS_LFOPARAMS;
- {$EXTERNALSYM DMUS_LFOPARAMS}
- TDMusLFOParams = _DMUS_LFOPARAMS;
- PDMusVEGParams = ^TDMusVEGParams;
- _DMUS_VEGPARAMS = packed record
- tcAttack: TCENT;
- tcDecay: TCENT;
- ptSustain: PERCENT;
- tcRelease: TCENT;
- tcVel2Attack: TCENT;
- tcKey2Decay: TCENT;
- end;
- {$EXTERNALSYM _DMUS_VEGPARAMS}
- DMUS_VEGPARAMS = _DMUS_VEGPARAMS;
- {$EXTERNALSYM DMUS_VEGPARAMS}
- TDMusVEGParams = _DMUS_VEGPARAMS;
- PDMusPEGParams = ^TDMusPEGParams;
- _DMUS_PEGPARAMS = packed record
- tcAttack: TCENT;
- tcDecay: TCENT;
- ptSustain: PERCENT;
- tcRelease: TCENT;
- tcVel2Attack: TCENT;
- tcKey2Decay: TCENT;
- pcRange: PCENT;
- end;
- {$EXTERNALSYM _DMUS_PEGPARAMS}
- DMUS_PEGPARAMS = _DMUS_PEGPARAMS;
- {$EXTERNALSYM DMUS_PEGPARAMS}
- TDMusPEGParams = _DMUS_PEGPARAMS;
- PDMusMSCParams = ^TDMusMSCParams;
- _DMUS_MSCPARAMS = packed record
- ptDefaultPan: PERCENT;
- end;
- {$EXTERNALSYM _DMUS_MSCPARAMS}
- DMUS_MSCPARAMS = _DMUS_MSCPARAMS;
- {$EXTERNALSYM DMUS_MSCPARAMS}
- TDMusMSCParams = _DMUS_MSCPARAMS;
- PDMusArticParams = ^TDMusArticParams;
- _DMUS_ARTICPARAMS = packed record
- LFO: TDMusLFOParams;
- VolEG: TDMusVEGParams;
- PitchEG: TDMusPEGParams;
- Misc: TDMusMSCParams;
- end;
- {$EXTERNALSYM _DMUS_ARTICPARAMS}
- DMUS_ARTICPARAMS = _DMUS_ARTICPARAMS;
- {$EXTERNALSYM DMUS_ARTICPARAMS}
- TDMusArticParams = _DMUS_ARTICPARAMS;
- PDMusArticulation = ^TDMusArticulation;
- _DMUS_ARTICULATION = packed record (* Articulation chunk for DMUS_DOWNLOADINFO_INSTRUMENT format. *)
- ulArt1Idx: Cardinal; // DLS Level 1 articulation chunk
- ulFirstExtCkIdx: Cardinal; // 3rd party extenstion chunks associated with the articulation
- end;
- {$EXTERNALSYM _DMUS_ARTICULATION}
- DMUS_ARTICULATION = _DMUS_ARTICULATION;
- {$EXTERNALSYM DMUS_ARTICULATION}
- TDMusArticulation = _DMUS_ARTICULATION;
- PDMusArticulation2 = ^TDMusArticulation2;
- _DMUS_ARTICULATION2 = packed record (* Articulation chunk for DMUS_DOWNLOADINFO_INSTRUMENT2 format. *)
- ulArtIdx: Cardinal; (* DLS Level 1/2 articulation chunk *)
- ulFirstExtCkIdx: Cardinal; (* 3rd party extenstion chunks associated with the articulation *)
- ulNextArtIdx: Cardinal; (* Additional articulation chunks *)
- end;
- {$EXTERNALSYM _DMUS_ARTICULATION2}
- DMUS_ARTICULATION2 = _DMUS_ARTICULATION2;
- {$EXTERNALSYM DMUS_ARTICULATION2}
- TDMusArticulation2 = _DMUS_ARTICULATION2;
- const
- DMUS_MIN_DATA_SIZE = 4;
- {$EXTERNALSYM DMUS_MIN_DATA_SIZE}
- type
- (* The actual number is determined by cbSize of struct _DMUS_EXTENSIONCHUNK *)
- PDMusExtensionChunk = ^TDMusExtensionChunk;
- _DMUS_EXTENSIONCHUNK = packed record
- cbSize: Cardinal; (* Size of extension chunk *)
- ulNextExtCkIdx: Cardinal; (* If zero no more 3rd party entenstion chunks *)
- ExtCkID: FOURCC;
- byExtCk: array[0..DMUS_MIN_DATA_SIZE-1] of Byte; (* The actual number that follows is determined by cbSize *)
- end;
- {$EXTERNALSYM _DMUS_EXTENSIONCHUNK}
- DMUS_EXTENSIONCHUNK = _DMUS_EXTENSIONCHUNK;
- {$EXTERNALSYM DMUS_EXTENSIONCHUNK}
- TDMusExtensionChunk = _DMUS_EXTENSIONCHUNK;
- (* The actual number is determined by cbSize of struct _DMUS_COPYRIGHT *)
- PDMusCopyright = ^TDMusCopyright;
- _DMUS_COPYRIGHT = packed record
- cbSize: Cardinal; (* Size of copyright information *)
- byCopyright: array[0..DMUS_MIN_DATA_SIZE-1] of Byte; (* The actual number that follows is determined by cbSize *)
- end;
- {$EXTERNALSYM _DMUS_COPYRIGHT}
- DMUS_COPYRIGHT = _DMUS_COPYRIGHT;
- {$EXTERNALSYM DMUS_COPYRIGHT}
- TDMusCopyright = _DMUS_COPYRIGHT;
- PDMusWaveData = ^TDMusWaveData;
- _DMUS_WAVEDATA = packed record
- cbSize: Cardinal;
- byData: array[0..DMUS_MIN_DATA_SIZE-1] of Byte;
- end;
- {$EXTERNALSYM _DMUS_WAVEDATA}
- DMUS_WAVEDATA = _DMUS_WAVEDATA;
- {$EXTERNALSYM DMUS_WAVEDATA}
- TDMusWaveData = _DMUS_WAVEDATA;
- PDMusWave = ^TDMusWave;
- _DMUS_WAVE = packed record
- ulFirstExtCkIdx: Cardinal; (* If zero no 3rd party entenstion chunks associated with the wave *)
- ulCopyrightIdx: Cardinal; (* If zero no Copyright information associated with the wave *)
- ulWaveDataIdx: Cardinal; (* Location of actual wave data. *)
- WaveformatEx: tWAVEFORMATEX;
- end;
- {$EXTERNALSYM _DMUS_WAVE}
- DMUS_WAVE = _DMUS_WAVE;
- {$EXTERNALSYM DMUS_WAVE}
- TDMusWave = _DMUS_WAVE;
- PDMusNoteRange = ^TDMusNoteRange;
- _DMUS_NOTERANGE = packed record
- dwLowNote: DWORD; (* Sets the low note for the range of MIDI note events to which the instrument responds.*)
- dwHighNote: DWORD; (* Sets the high note for the range of MIDI note events to which the instrument responds.*)
- end;
- {$EXTERNALSYM _DMUS_NOTERANGE}
- DMUS_NOTERANGE = _DMUS_NOTERANGE;
- {$EXTERNALSYM DMUS_NOTERANGE}
- TDMusNoteRange = _DMUS_NOTERANGE;
- PDMusWaveArtDL = ^TDMusWaveArtDL;
- _DMUS_WAVEARTDL = packed record
- ulDownloadIdIdx: Cardinal; (* Download ID's of each buffer *)
- ulBus: Cardinal; (* Playback bus *)
- ulBuffers: Cardinal; (* Buffers *)
- ulMasterDLId: Cardinal; (* Download ID of master voice of slave group *)
- usOptions: Word; (* Same as DLS2 region options *)
- end;
- {$EXTERNALSYM _DMUS_WAVEARTDL}
- DMUS_WAVEARTDL = _DMUS_WAVEARTDL;
- {$EXTERNALSYM DMUS_WAVEARTDL}
- TDMusWaveArtDL = _DMUS_WAVEARTDL;
- PDMusWaveDL = ^TDMusWaveDL;
- _DMUS_WAVEDL = packed record
- cbWaveData: Cardinal; (* Bytes of wave data *)
- end;
- {$EXTERNALSYM _DMUS_WAVEDL}
- DMUS_WAVEDL = _DMUS_WAVEDL;
- {$EXTERNALSYM DMUS_WAVEDL}
- TDMusWaveDL = _DMUS_WAVEDL;
- (************************************************************************
- * *
- * dmerror.h -- Error codes returned by DirectMusic API's *
- * *
- * Copyright (c) Microsoft Corporation. All rights reserved. *
- * *
- ************************************************************************)
- const
- FACILITY_DIRECTMUSIC = $878; (* Shared with DirectSound *)
- {$EXTERNALSYM FACILITY_DIRECTMUSIC}
- DMUS_ERRBASE = $1000; (* Make error codes human readable in hex *)
- {$EXTERNALSYM DMUS_ERRBASE}
- // #define MAKE_DMHRESULTSUCCESS(code) MAKE_HRESULT(0, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)))
- function MAKE_DMHRESULTSUCCESS(Code: DWord): DWord;
- {$EXTERNALSYM MAKE_DMHRESULTSUCCESS}
- // #define MAKE_DMHRESULTERROR(code) MAKE_HRESULT(1, FACILITY_DIRECTMUSIC, (DMUS_ERRBASE + (code)))
- function MAKE_DMHRESULTERROR(Code: DWord): DWord;
- {$EXTERNALSYM MAKE_DMHRESULTERROR}
- const
- MAKE_DMHRESULTSUCCESS_R = (0 shl 31) or (FACILITY_DIRECTMUSIC shl 16) or DMUS_ERRBASE;
- MAKE_DMHRESULTERROR_R = (1 shl 31) or (FACILITY_DIRECTMUSIC shl 16) or DMUS_ERRBASE;
- (* DMUS_S_PARTIALLOAD
- *
- * The object could only load partially. This can happen if some components are
- * not registered properly, such as embedded tracks and tools. This can also happen
- * if some content is missing. For example, if a segment uses a DLS collection that
- * is not in the loader's current search directory.
- *)
- DMUS_S_PARTIALLOAD = (MAKE_DMHRESULTSUCCESS_R + $091);
- {$EXTERNALSYM DMUS_S_PARTIALLOAD}
- (* DMUS_S_PARTIALDOWNLOAD
- *
- * Return value from IDirectMusicBand::Download() which indicates that
- * some of the instruments safely downloaded, but others failed. This usually
- * occurs when some instruments are on PChannels not supported by the performance
- * or port.
- *)
- DMUS_S_PARTIALDOWNLOAD = (MAKE_DMHRESULTSUCCESS_R + $092);
- {$EXTERNALSYM DMUS_S_PARTIALDOWNLOAD}
- (* DMUS_S_REQUEUE
- *
- * Return value from IDirectMusicTool::ProcessPMsg() which indicates to the
- * performance that it should cue the PMsg again automatically.
- *)
- DMUS_S_REQUEUE = (MAKE_DMHRESULTSUCCESS_R + $200);
- {$EXTERNALSYM DMUS_S_REQUEUE}
- (* DMUS_S_FREE
- *
- * Return value from IDirectMusicTool::ProcessPMsg() which indicates to the
- * performance that it should free the PMsg automatically.
- *)
- DMUS_S_FREE = (MAKE_DMHRESULTSUCCESS_R + $201);
- {$EXTERNALSYM DMUS_S_FREE}
- (* DMUS_S_END
- *
- * Return value from IDirectMusicTrack::Play() which indicates to the
- * segment that the track has no more data after mtEnd.
- *)
- DMUS_S_END = (MAKE_DMHRESULTSUCCESS_R + $202);
- {$EXTERNALSYM DMUS_S_END}
- (* DMUS_S_STRING_TRUNCATED
- *
- * Returned string has been truncated to fit the buffer size.
- *)
- DMUS_S_STRING_TRUNCATED = (MAKE_DMHRESULTSUCCESS_R + $210);
- {$EXTERNALSYM DMUS_S_STRING_TRUNCATED}
- (* DMUS_S_LAST_TOOL
- *
- * Returned from IDirectMusicGraph::StampPMsg(), this indicates that the PMsg
- * is already stamped with the last tool in the graph. The returned PMsg's
- * tool pointer is now NULL.
- *)
- DMUS_S_LAST_TOOL = (MAKE_DMHRESULTSUCCESS_R + $211);
- {$EXTERNALSYM DMUS_S_LAST_TOOL}
- (* DMUS_S_OVER_CHORD
- *
- * Returned from IDirectMusicPerformance::MusicToMIDI(), this indicates
- * that no note has been calculated because the music value has the note
- * at a position higher than the top note of the chord. This applies only
- * to DMUS_PLAYMODE_NORMALCHORD play mode. This success code indicates
- * that the caller should not do anything with the note. It is not meant
- * to be played against this chord.
- *)
- DMUS_S_OVER_CHORD = (MAKE_DMHRESULTSUCCESS_R + $212);
- {$EXTERNALSYM DMUS_S_OVER_CHORD}
- (* DMUS_S_UP_OCTAVE
- *
- * Returned from IDirectMusicPerformance::MIDIToMusic(), and
- * IDirectMusicPerformance::MusicToMIDI(), this indicates
- * that the note conversion generated a note value that is below 0,
- * so it has been bumped up one or more octaves to be in the proper
- * MIDI range of 0 through 127.
- * Note that this is valid for MIDIToMusic() when using play modes
- * DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of
- * which store MIDI values in wMusicValue. With MusicToMIDI(), it is
- * valid for all play modes.
- * Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.
- *)
- DMUS_S_UP_OCTAVE = (MAKE_DMHRESULTSUCCESS_R + $213);
- {$EXTERNALSYM DMUS_S_UP_OCTAVE}
- (* DMUS_S_DOWN_OCTAVE
- *
- * Returned from IDirectMusicPerformance::MIDIToMusic(), and
- * IDirectMusicPerformance::MusicToMIDI(), this indicates
- * that the note conversion generated a note value that is above 127,
- * so it has been bumped down one or more octaves to be in the proper
- * MIDI range of 0 through 127.
- * Note that this is valid for MIDIToMusic() when using play modes
- * DMUS_PLAYMODE_FIXEDTOCHORD and DMUS_PLAYMODE_FIXEDTOKEY, both of
- * which store MIDI values in wMusicValue. With MusicToMIDI(), it is
- * valid for all play modes.
- * Ofcourse, DMUS_PLAYMODE_FIXED will never return this success code.
- *)
- DMUS_S_DOWN_OCTAVE = (MAKE_DMHRESULTSUCCESS_R + $214);
- {$EXTERNALSYM DMUS_S_DOWN_OCTAVE}
- (* DMUS_S_NOBUFFERCONTROL
- *
- * Although the audio output from the port will be routed to the
- * same device as the given DirectSound buffer, buffer controls
- * such as pan and volume will not affect the output.
- *
- *)
- DMUS_S_NOBUFFERCONTROL = (MAKE_DMHRESULTSUCCESS_R + $215);
- {$EXTERNALSYM DMUS_S_NOBUFFERCONTROL}
- (* DMUS_S_GARBAGE_COLLECTED
- *
- * The requested operation was not performed because during CollectGarbage
- * the loader determined that the object had been released.
- *)
- DMUS_S_GARBAGE_COLLECTED = (MAKE_DMHRESULTSUCCESS_R + $216);
- {$EXTERNALSYM DMUS_S_GARBAGE_COLLECTED}
- (* DMUS_E_DRIVER_FAILED
- *
- * An unexpected error was returned from a device driver, indicating
- * possible failure of the driver or hardware.
- *)
- DMUS_E_DRIVER_FAILED = (MAKE_DMHRESULTERROR_R + $0101);
- {$EXTERNALSYM DMUS_E_DRIVER_FAILED}
- (* DMUS_E_PORTS_OPEN
- *
- * The requested operation cannot be performed while there are
- * instantiated ports in any process in the system.
- *)
- DMUS_E_PORTS_OPEN = (MAKE_DMHRESULTERROR_R + $0102);
- {$EXTERNALSYM DMUS_E_PORTS_OPEN}
- (* DMUS_E_DEVICE_IN_USE
- *
- * The requested device is already in use (possibly by a non-DirectMusic
- * client) and cannot be opened again.
- *)
- DMUS_E_DEVICE_IN_USE = (MAKE_DMHRESULTERROR_R + $0103);
- {$EXTERNALSYM DMUS_E_DEVICE_IN_USE}
- (* DMUS_E_INSUFFICIENTBUFFER
- *
- * Buffer is not large enough for requested operation.
- *)
- DMUS_E_INSUFFICIENTBUFFER = (MAKE_DMHRESULTERROR_R + $0104);
- {$EXTERNALSYM DMUS_E_INSUFFICIENTBUFFER}
- (* DMUS_E_BUFFERNOTSET
- *
- * No buffer was prepared for the download data.
- *)
- DMUS_E_BUFFERNOTSET = (MAKE_DMHRESULTERROR_R + $0105);
- {$EXTERNALSYM DMUS_E_BUFFERNOTSET}
- (* DMUS_E_BUFFERNOTAVAILABLE
- *
- * Download failed due to inability to access or create download buffer.
- *)
- DMUS_E_BUFFERNOTAVAILABLE = (MAKE_DMHRESULTERROR_R + $0106);
- {$EXTERNALSYM DMUS_E_BUFFERNOTAVAILABLE}
- (* DMUS_E_NOTADLSCOL
- *
- * Error parsing DLS collection. File is corrupt.
- *)
- DMUS_E_NOTADLSCOL = (MAKE_DMHRESULTERROR_R + $0108);
- {$EXTERNALSYM DMUS_E_NOTADLSCOL}
- (* DMUS_E_INVALIDOFFSET
- *
- * Wave chunks in DLS collection file are at incorrect offsets.
- *)
- DMUS_E_INVALIDOFFSET = (MAKE_DMHRESULTERROR_R + $0109);
- {$EXTERNALSYM DMUS_E_INVALIDOFFSET}
- (* DMUS_E_ALREADY_LOADED
- *
- * Second attempt to load a DLS collection that is currently open.
- *)
- DMUS_E_ALREADY_LOADED = (MAKE_DMHRESULTERROR_R + $0111);
- {$EXTERNALSYM DMUS_E_ALREADY_LOADED}
- (* DMUS_E_INVALIDPOS
- *
- * Error reading wave data from DLS collection. Indicates bad file.
- *)
- DMUS_E_INVALIDPOS = (MAKE_DMHRESULTERROR_R + $0113);
- {$EXTERNALSYM DMUS_E_INVALIDPOS}
- (* DMUS_E_INVALIDPATCH
- *
- * There is no instrument in the collection that matches patch number.
- *)
- DMUS_E_INVALIDPATCH = (MAKE_DMHRESULTERROR_R + $0114);
- {$EXTERNALSYM DMUS_E_INVALIDPATCH}
- (* DMUS_E_CANNOTSEEK
- *
- * The IStream* doesn't support Seek().
- *)
- DMUS_E_CANNOTSEEK = (MAKE_DMHRESULTERROR_R + $0115);
- {$EXTERNALSYM DMUS_E_CANNOTSEEK}
- (* DMUS_E_CANNOTWRITE
- *
- * The IStream* doesn't support Write().
- *)
- DMUS_E_CANNOTWRITE = (MAKE_DMHRESULTERROR_R + $0116);
- {$EXTERNALSYM DMUS_E_CANNOTWRITE}
- (* DMUS_E_CHUNKNOTFOUND
- *
- * The RIFF parser doesn't contain a required chunk while parsing file.
- *)
- DMUS_E_CHUNKNOTFOUND = (MAKE_DMHRESULTERROR_R + $0117);
- {$EXTERNALSYM DMUS_E_CHUNKNOTFOUND}
- (* DMUS_E_INVALID_DOWNLOADID
- *
- * Invalid download id was used in the process of creating a download buffer.
- *)
- DMUS_E_INVALID_DOWNLOADID = (MAKE_DMHRESULTERROR_R + $0119);
- {$EXTERNALSYM DMUS_E_INVALID_DOWNLOADID}
- (* DMUS_E_NOT_DOWNLOADED_TO_PORT
- *
- * Tried to unload an object that was not downloaded or previously unloaded.
- *)
- DMUS_E_NOT_DOWNLOADED_TO_PORT = (MAKE_DMHRESULTERROR_R + $0120);
- {$EXTERNALSYM DMUS_E_NOT_DOWNLOADED_TO_PORT}
- (* DMUS_E_ALREADY_DOWNLOADED
- *
- * Buffer was already downloaded to synth.
- *)
- DMUS_E_ALREADY_DOWNLOADED = (MAKE_DMHRESULTERROR_R + $0121);
- {$EXTERNALSYM DMUS_E_ALREADY_DOWNLOADED}
- (* DMUS_E_UNKNOWN_PROPERTY
- *
- * The specified property item was not recognized by the target object.
- *)
- DMUS_E_UNKNOWN_PROPERTY = (MAKE_DMHRESULTERROR_R + $0122);
- {$EXTERNALSYM DMUS_E_UNKNOWN_PROPERTY}
- (* DMUS_E_SET_UNSUPPORTED
- *
- * The specified property item may not be set on the target object.
- *)
- DMUS_E_SET_UNSUPPORTED = (MAKE_DMHRESULTERROR_R + $0123);
- {$EXTERNALSYM DMUS_E_SET_UNSUPPORTED}
- (* DMUS_E_GET_UNSUPPORTED
- *
- * The specified property item may not be retrieved from the target object.
- *)
- DMUS_E_GET_UNSUPPORTED = (MAKE_DMHRESULTERROR_R + $0124);
- {$EXTERNALSYM DMUS_E_GET_UNSUPPORTED}
- (* DMUS_E_NOTMONO
- *
- * Wave chunk has more than one interleaved channel. DLS format requires MONO.
- *)
- DMUS_E_NOTMONO = (MAKE_DMHRESULTERROR_R + $0125);
- {$EXTERNALSYM DMUS_E_NOTMONO}
- (* DMUS_E_BADARTICULATION
- *
- * Invalid articulation chunk in DLS collection.
- *)
- DMUS_E_BADARTICULATION = (MAKE_DMHRESULTERROR_R + $0126);
- {$EXTERNALSYM DMUS_E_BADARTICULATION}
- (* DMUS_E_BADINSTRUMENT
- *
- * Invalid instrument chunk in DLS collection.
- *)
- DMUS_E_BADINSTRUMENT = (MAKE_DMHRESULTERROR_R + $0127);
- {$EXTERNALSYM DMUS_E_BADINSTRUMENT}
- (* DMUS_E_BADWAVELINK
- *
- * Wavelink chunk in DLS collection points to invalid wave.
- *)
- DMUS_E_BADWAVELINK = (MAKE_DMHRESULTERROR_R + $0128);
- {$EXTERNALSYM DMUS_E_BADWAVELINK}
- (* DMUS_E_NOARTICULATION
- *
- * Articulation missing from instrument in DLS collection.
- *)
- DMUS_E_NOARTICULATION = (MAKE_DMHRESULTERROR_R + $0129);
- {$EXTERNALSYM DMUS_E_NOARTICULATION}
- (* DMUS_E_NOTPCM
- *
- * Downoaded DLS wave is not in PCM format.
- *)
- DMUS_E_NOTPCM = (MAKE_DMHRESULTERROR_R + $012A);
- {$EXTERNALSYM DMUS_E_NOTPCM}
- (* DMUS_E_BADWAVE
- *
- * Bad wave chunk in DLS collection
- *)
- DMUS_E_BADWAVE = (MAKE_DMHRESULTERROR_R + $012B);
- {$EXTERNALSYM DMUS_E_BADWAVE}
- (* DMUS_E_BADOFFSETTABLE
- *
- * Offset Table for download buffer has errors.
- *)
- DMUS_E_BADOFFSETTABLE = (MAKE_DMHRESULTERROR_R + $012C);
- {$EXTERNALSYM DMUS_E_BADOFFSETTABLE}
- (* DMUS_E_UNKNOWNDOWNLOAD
- *
- * Attempted to download unknown data type.
- *)
- DMUS_E_UNKNOWNDOWNLOAD = (MAKE_DMHRESULTERROR_R + $012D);
- {$EXTERNALSYM DMUS_E_UNKNOWNDOWNLOAD}
- (* DMUS_E_NOSYNTHSINK
- *
- * The operation could not be completed because no sink was connected to
- * the synthesizer.
- *)
- DMUS_E_NOSYNTHSINK = (MAKE_DMHRESULTERROR_R + $012E);
- {$EXTERNALSYM DMUS_E_NOSYNTHSINK}
- (* DMUS_E_ALREADYOPEN
- *
- * An attempt was made to open the software synthesizer while it was already
- * open.
- * ASSERT?
- *)
- DMUS_E_ALREADYOPEN = (MAKE_DMHRESULTERROR_R + $012F);
- {$EXTERNALSYM DMUS_E_ALREADYOPEN}
- (* DMUS_E_ALREADYCLOSE
- *
- * An attempt was made to close the software synthesizer while it was already
- * open.
- * ASSERT?
- *)
- DMUS_E_ALREADYCLOSED = (MAKE_DMHRESULTERROR_R + $0130);
- {$EXTERNALSYM DMUS_E_ALREADYCLOSED}
- (* DMUS_E_SYNTHNOTCONFIGURED
- *
- * The operation could not be completed because the software synth has not
- * yet been fully configured.
- * ASSERT?
- *)
- DMUS_E_SYNTHNOTCONFIGURED = (MAKE_DMHRESULTERROR_R + $0131);
- {$EXTERNALSYM DMUS_E_SYNTHNOTCONFIGURED}
- (* DMUS_E_SYNTHACTIVE
- *
- * The operation cannot be carried out while the synthesizer is active.
- *)
- DMUS_E_SYNTHACTIVE = (MAKE_DMHRESULTERROR_R + $0132);
- {$EXTERNALSYM DMUS_E_SYNTHACTIVE}
- (* DMUS_E_CANNOTREAD
- *
- * An error occurred while attempting to read from the IStream* object.
- *)
- DMUS_E_CANNOTREAD = (MAKE_DMHRESULTERROR_R + $0133);
- {$EXTERNALSYM DMUS_E_CANNOTREAD}
- (* DMUS_E_DMUSIC_RELEASED
- *
- * The operation cannot be performed because the final instance of the
- * DirectMusic object was released. Ports cannot be used after final
- * release of the DirectMusic object.
- *)
- DMUS_E_DMUSIC_RELEASED = (MAKE_DMHRESULTERROR_R + $0134);
- {$EXTERNALSYM DMUS_E_DMUSIC_RELEASED}
- (* DMUS_E_BUFFER_EMPTY
- *
- * There was no data in the referenced buffer.
- *)
- DMUS_E_BUFFER_EMPTY = (MAKE_DMHRESULTERROR_R + $0135);
- {$EXTERNALSYM DMUS_E_BUFFER_EMPTY}
- (* DMUS_E_BUFFER_FULL
- *
- * There is insufficient space to insert the given event into the buffer.
- *)
- DMUS_E_BUFFER_FULL = (MAKE_DMHRESULTERROR_R + $0136);
- {$EXTERNALSYM DMUS_E_BUFFER_FULL}
- (* DMUS_E_PORT_NOT_CAPTURE
- *
- * The given operation could not be carried out because the port is a
- * capture port.
- *)
- DMUS_E_PORT_NOT_CAPTURE = (MAKE_DMHRESULTERROR_R + $0137);
- {$EXTERNALSYM DMUS_E_PORT_NOT_CAPTURE}
- (* DMUS_E_PORT_NOT_RENDER
- *
- * The given operation could not be carried out because the port is a
- * render port.
- *)
- DMUS_E_PORT_NOT_RENDER = (MAKE_DMHRESULTERROR_R + $0138);
- {$EXTERNALSYM DMUS_E_PORT_NOT_RENDER}
- (* DMUS_E_DSOUND_NOT_SET
- *
- * The port could not be created because no DirectSound has been specified.
- * Specify a DirectSound interface via the IDirectMusic::SetDirectSound
- * method; pass NULL to have DirectMusic manage usage of DirectSound.
- *)
- DMUS_E_DSOUND_NOT_SET = (MAKE_DMHRESULTERROR_R + $0139);
- {$EXTERNALSYM DMUS_E_DSOUND_NOT_SET}
- (* DMUS_E_ALREADY_ACTIVATED
- *
- * The operation cannot be carried out while the port is active.
- *)
- DMUS_E_ALREADY_ACTIVATED = (MAKE_DMHRESULTERROR_R + $013A);
- {$EXTERNALSYM DMUS_E_ALREADY_ACTIVATED}
- (* DMUS_E_INVALIDBUFFER
- *
- * Invalid DirectSound buffer was handed to port.
- *)
- DMUS_E_INVALIDBUFFER = (MAKE_DMHRESULTERROR_R + $013B);
- {$EXTERNALSYM DMUS_E_INVALIDBUFFER}
- (* DMUS_E_WAVEFORMATNOTSUPPORTED
- *
- * Invalid buffer format was handed to the synth sink.
- *)
- DMUS_E_WAVEFORMATNOTSUPPORTED = (MAKE_DMHRESULTERROR_R + $013C);
- {$EXTERNALSYM DMUS_E_WAVEFORMATNOTSUPPORTED}
- (* DMUS_E_SYNTHINACTIVE
- *
- * The operation cannot be carried out while the synthesizer is inactive.
- *)
- DMUS_E_SYNTHINACTIVE = (MAKE_DMHRESULTERROR_R + $013D);
- {$EXTERNALSYM DMUS_E_SYNTHINACTIVE}
- (* DMUS_E_DSOUND_ALREADY_SET
- *
- * IDirectMusic::SetDirectSound has already been called. It may not be
- * changed while in use.
- *)
- DMUS_E_DSOUND_ALREADY_SET = (MAKE_DMHRESULTERROR_R + $013E);
- {$EXTERNALSYM DMUS_E_DSOUND_ALREADY_SET}
- (* DMUS_E_INVALID_EVENT
- *
- * The given event is invalid (either it is not a valid MIDI message
- * or it makes use of running status). The event cannot be packed
- * into the buffer.
- *)
- DMUS_E_INVALID_EVENT = (MAKE_DMHRESULTERROR_R + $013F);
- {$EXTERNALSYM DMUS_E_INVALID_EVENT}
- (* DMUS_E_UNSUPPORTED_STREAM
- *
- * The IStream* object does not contain data supported by the loading object.
- *)
- DMUS_E_UNSUPPORTED_STREAM = (MAKE_DMHRESULTERROR_R + $0150);
- {$EXTERNALSYM DMUS_E_UNSUPPORTED_STREAM}
- (* DMUS_E_ALREADY_INITED
- *
- * The object has already been initialized.
- *)
- DMUS_E_ALREADY_INITED = (MAKE_DMHRESULTERROR_R + $0151);
- {$EXTERNALSYM DMUS_E_ALREADY_INITED}
- (* DMUS_E_INVALID_BAND
- *
- * The file does not contain a valid band.
- *)
- DMUS_E_INVALID_BAND = (MAKE_DMHRESULTERROR_R + $0152);
- {$EXTERNALSYM DMUS_E_INVALID_BAND}
- (* DMUS_E_TRACK_HDR_NOT_FIRST_CK
- *
- * The IStream* object's data does not have a track header as the first chunk,
- * and therefore can not be read by the segment object.
- *)
- DMUS_E_TRACK_HDR_NOT_FIRST_CK = (MAKE_DMHRESULTERROR_R + $0155);
- {$EXTERNALSYM DMUS_E_TRACK_HDR_NOT_FIRST_CK}
- (* DMUS_E_TOOL_HDR_NOT_FIRST_CK
- *
- * The IStream* object's data does not have a tool header as the first chunk,
- * and therefore can not be read by the graph object.
- *)
- DMUS_E_TOOL_HDR_NOT_FIRST_CK = (MAKE_DMHRESULTERROR_R + $0156);
- {$EXTERNALSYM DMUS_E_TOOL_HDR_NOT_FIRST_CK}
- (* DMUS_E_INVALID_TRACK_HDR
- *
- * The IStream* object's data contains an invalid track header (ckid is 0 and
- * fccType is NULL,) and therefore can not be read by the segment object.
- *)
- DMUS_E_INVALID_TRACK_HDR = (MAKE_DMHRESULTERROR_R + $0157);
- {$EXTERNALSYM DMUS_E_INVALID_TRACK_HDR}
- (* DMUS_E_INVALID_TOOL_HDR
- *
- * The IStream* object's data contains an invalid tool header (ckid is 0 and
- * fccType is NULL,) and therefore can not be read by the graph object.
- *)
- DMUS_E_INVALID_TOOL_HDR = (MAKE_DMHRESULTERROR_R + $0158);
- {$EXTERNALSYM DMUS_E_INVALID_TOOL_HDR}
- (* DMUS_E_ALL_TOOLS_FAILED
- *
- * The graph object was unable to load all tools from the IStream* object data.
- * This may be due to errors in the stream, or the tools being incorrectly
- * registered on the client.
- *)
- DMUS_E_ALL_TOOLS_FAILED = (MAKE_DMHRESULTERROR_R + $0159);
- {$EXTERNALSYM DMUS_E_ALL_TOOLS_FAILED}
- (* DMUS_E_ALL_TRACKS_FAILED
- *
- * The segment object was unable to load all tracks from the IStream* object data.
- * This may be due to errors in the stream, or the tracks being incorrectly
- * registered on the client.
- *)
- DMUS_E_ALL_TRACKS_FAILED = (MAKE_DMHRESULTERROR_R + $0160);
- {$EXTERNALSYM DMUS_E_ALL_TRACKS_FAILED}
- (* DMUS_E_NOT_FOUND
- *
- * The requested item was not contained by the object.
- *)
- DMUS_E_NOT_FOUND = (MAKE_DMHRESULTERROR_R + $0161);
- {$EXTERNALSYM DMUS_E_NOT_FOUND}
- (* DMUS_E_NOT_INIT
- *
- * A required object is not initialized or failed to initialize.
- *)
- DMUS_E_NOT_INIT = (MAKE_DMHRESULTERROR_R + $0162);
- {$EXTERNALSYM DMUS_E_NOT_INIT}
- (* DMUS_E_TYPE_DISABLED
- *
- * The requested parameter type is currently disabled. Parameter types may
- * be enabled and disabled by certain calls to SetParam().
- *)
- DMUS_E_TYPE_DISABLED = (MAKE_DMHRESULTERROR_R + $0163);
- {$EXTERNALSYM DMUS_E_TYPE_DISABLED}
- (* DMUS_E_TYPE_UNSUPPORTED
- *
- * The requested parameter type is not supported on the object.
- *)
- DMUS_E_TYPE_UNSUPPORTED = (MAKE_DMHRESULTERROR_R + $0164);
- {$EXTERNALSYM DMUS_E_TYPE_UNSUPPORTED}
- (* DMUS_E_TIME_PAST
- *
- * The time is in the past, and the operation can not succeed.
- *)
- DMUS_E_TIME_PAST = (MAKE_DMHRESULTERROR_R + $0165);
- {$EXTERNALSYM DMUS_E_TIME_PAST}
- (* DMUS_E_TRACK_NOT_FOUND
- *
- * The requested track is not contained by the segment.
- *)
- DMUS_E_TRACK_NOT_FOUND = (MAKE_DMHRESULTERROR_R + $0166);
- {$EXTERNALSYM DMUS_E_TRACK_NOT_FOUND}
- (* DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT
- *
- * The track does not support clock time playback or getparam.
- *)
- DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT = (MAKE_DMHRESULTERROR_R + $0167);
- {$EXTERNALSYM DMUS_E_TRACK_NO_CLOCKTIME_SUPPORT}
- (* DMUS_E_NO_MASTER_CLOCK
- *
- * There is no master clock in the performance. Be sure to call
- * IDirectMusicPerformance::Init().
- *)
- DMUS_E_NO_MASTER_CLOCK = (MAKE_DMHRESULTERROR_R + $0170);
- {$EXTERNALSYM DMUS_E_NO_MASTER_CLOCK}
- (* DMUS_E_LOADER_NOCLASSID
- *
- * The class id field is required and missing in the DMUS_OBJECTDESC.
- *)
- DMUS_E_LOADER_NOCLASSID = (MAKE_DMHRESULTERROR_R + $0180);
- {$EXTERNALSYM DMUS_E_LOADER_NOCLASSID}
- (* DMUS_E_LOADER_BADPATH
- *
- * The requested file path is invalid.
- *)
- DMUS_E_LOADER_BADPATH = (MAKE_DMHRESULTERROR_R + $0181);
- {$EXTERNALSYM DMUS_E_LOADER_BADPATH}
- (* DMUS_E_LOADER_FAILEDOPEN
- *
- * File open failed - either file doesn't exist or is locked.
- *)
- DMUS_E_LOADER_FAILEDOPEN = (MAKE_DMHRESULTERROR_R + $0182);
- {$EXTERNALSYM DMUS_E_LOADER_FAILEDOPEN}
- (* DMUS_E_LOADER_FORMATNOTSUPPORTED
- *
- * Search data type is not supported.
- *)
- DMUS_E_LOADER_FORMATNOTSUPPORTED = (MAKE_DMHRESULTERROR_R + $0183);
- {$EXTERNALSYM DMUS_E_LOADER_FORMATNOTSUPPORTED}
- (* DMUS_E_LOADER_FAILEDCREATE
- *
- * Unable to find or create object.
- *)
- DMUS_E_LOADER_FAILEDCREATE = (MAKE_DMHRESULTERROR_R + $0184);
- {$EXTERNALSYM DMUS_E_LOADER_FAILEDCREATE}
- (* DMUS_E_LOADER_OBJECTNOTFOUND
- *
- * Object was not found.
- *)
- DMUS_E_LOADER_OBJECTNOTFOUND = (MAKE_DMHRESULTERROR_R + $0185);
- {$EXTERNALSYM DMUS_E_LOADER_OBJECTNOTFOUND}
- (* DMUS_E_LOADER_NOFILENAME
- *
- * The file name is missing from the DMUS_OBJECTDESC.
- *)
- DMUS_E_LOADER_NOFILENAME = (MAKE_DMHRESULTERROR_R + $0186);
- {$EXTERNALSYM DMUS_E_LOADER_NOFILENAME}
- (* DMUS_E_INVALIDFILE
- *
- * The file requested is not a valid file.
- *)
- DMUS_E_INVALIDFILE = (MAKE_DMHRESULTERROR_R + $0200);
- {$EXTERNALSYM DMUS_E_INVALIDFILE}
- (* DMUS_E_ALREADY_EXISTS
- *
- * The tool is already contained in the graph. Create a new instance.
- *)
- DMUS_E_ALREADY_EXISTS = (MAKE_DMHRESULTERROR_R + $0201);
- {$EXTERNALSYM DMUS_E_ALREADY_EXISTS}
- (* DMUS_E_OUT_OF_RANGE
- *
- * Value is out of range, for instance the requested length is longer than
- * the segment.
- *)
- DMUS_E_OUT_OF_RANGE = (MAKE_DMHRESULTERROR_R + $0202);
- {$EXTERNALSYM DMUS_E_OUT_OF_RANGE}
- (* DMUS_E_SEGMENT_INIT_FAILED
- *
- * Segment initialization failed, most likely due to a critical memory situation.
- *)
- DMUS_E_SEGMENT_INIT_FAILED = (MAKE_DMHRESULTERROR_R + $0203);
- {$EXTERNALSYM DMUS_E_SEGMENT_INIT_FAILED}
- (* DMUS_E_ALREADY_SENT
- *
- * The DMUS_PMSG has already been sent to the performance object via
- * IDirectMusicPerformance::SendPMsg().
- *)
- DMUS_E_ALREADY_SENT = (MAKE_DMHRESULTERROR_R + $0204);
- {$EXTERNALSYM DMUS_E_ALREADY_SENT}
- (* DMUS_E_CANNOT_FREE
- *
- * The DMUS_PMSG was either not allocated by the performance via
- * IDirectMusicPerformance::AllocPMsg(), or it was already freed via
- * IDirectMusicPerformance::FreePMsg().
- *)
- DMUS_E_CANNOT_FREE = (MAKE_DMHRESULTERROR_R + $0205);
- {$EXTERNALSYM DMUS_E_CANNOT_FREE}
- (* DMUS_E_CANNOT_OPEN_PORT
- *
- * The default system port could not be opened.
- *)
- DMUS_E_CANNOT_OPEN_PORT = (MAKE_DMHRESULTERROR_R + $0206);
- {$EXTERNALSYM DMUS_E_CANNOT_OPEN_PORT}
- (* DMUS_E_CANNOT_CONVERT
- *
- * A call to MIDIToMusic() or MusicToMIDI() resulted in an error because
- * the requested conversion could not happen. This usually occurs when the
- * provided DMUS_CHORD_KEY structure has an invalid chord or scale pattern.
- *)
- DMUS_E_CANNOT_CONVERT = (MAKE_DMHRESULTERROR_R + $0207);
- {$EXTERNALSYM DMUS_E_CANNOT_CONVERT}
- (* misspelling in previous versions of DirectX preserved for backward compatibility *)
- DMUS_E_CONNOT_CONVERT = DMUS_E_CANNOT_CONVERT;
- {$EXTERNALSYM DMUS_E_CONNOT_CONVERT}
- (* DMUS_E_DESCEND_CHUNK_FAIL
- *
- * DMUS_E_DESCEND_CHUNK_FAIL is returned when the end of the file
- * was reached before the desired chunk was found.
- *)
- DMUS_E_DESCEND_CHUNK_FAIL = (MAKE_DMHRESULTERROR_R + $0210);
- {$EXTERNALSYM DMUS_E_DESCEND_CHUNK_FAIL}
- (* DMUS_E_NOT_LOADED
- *
- * An attempt to use this object failed because it first needs to
- * be loaded.
- *)
- DMUS_E_NOT_LOADED = (MAKE_DMHRESULTERROR_R + $0211);
- {$EXTERNALSYM DMUS_E_NOT_LOADED}
- (* DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE
- *
- * The activeX scripting engine for the script's language is not compatible with
- * DirectMusic.
- *
- *)
- DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE = (MAKE_DMHRESULTERROR_R + $0213);
- {$EXTERNALSYM DMUS_E_SCRIPT_LANGUAGE_INCOMPATIBLE}
- (* DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE
- *
- * A varient was used that had a type that is not supported by DirectMusic.
- *
- *)
- DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE = (MAKE_DMHRESULTERROR_R + $0214);
- {$EXTERNALSYM DMUS_E_SCRIPT_UNSUPPORTED_VARTYPE}
- (* DMUS_E_SCRIPT_ERROR_IN_SCRIPT
- *
- * An error was encountered while parsing or executing the script.
- * The pErrorInfo parameter (if supplied) was filled with information about the error.
- *)
- DMUS_E_SCRIPT_ERROR_IN_SCRIPT = (MAKE_DMHRESULTERROR_R + $0215);
- {$EXTERNALSYM DMUS_E_SCRIPT_ERROR_IN_SCRIPT}
- (* DMUS_E_SCRIPT_CANTLOAD_OLEAUT32
- *
- * Loading of oleaut32.dll failed. VBScript and other activeX scripting languages
- * require use of oleaut32.dll. On platforms where oleaut32.dll is not present, only
- * the DirectMusicScript language, which doesn't require oleaut32.dll can be used.
- *)
- DMUS_E_SCRIPT_CANTLOAD_OLEAUT32 = (MAKE_DMHRESULTERROR_R + $0216);
- {$EXTERNALSYM DMUS_E_SCRIPT_CANTLOAD_OLEAUT32}
- (* DMUS_E_SCRIPT_LOADSCRIPT_ERROR
- *
- * An error occured while parsing a script loaded using LoadScript. The script that
- * was loaded contains an error.
- *)
- DMUS_E_SCRIPT_LOADSCRIPT_ERROR = (MAKE_DMHRESULTERROR_R + $0217);
- {$EXTERNALSYM DMUS_E_SCRIPT_LOADSCRIPT_ERROR}
- (* DMUS_E_SCRIPT_INVALID_FILE
- *
- * The script file is invalid.
- *)
- DMUS_E_SCRIPT_INVALID_FILE = (MAKE_DMHRESULTERROR_R + $0218);
- {$EXTERNALSYM DMUS_E_SCRIPT_INVALID_FILE}
- (* DMUS_E_INVALID_SCRIPTTRACK
- *
- * The file contains an invalid script track.
- *)
- DMUS_E_INVALID_SCRIPTTRACK = (MAKE_DMHRESULTERROR_R + $0219);
- {$EXTERNALSYM DMUS_E_INVALID_SCRIPTTRACK}
- (* DMUS_E_SCRIPT_VARIABLE_NOT_FOUND
- *
- * The script does not contain a variable with the specified name.
- *)
- DMUS_E_SCRIPT_VARIABLE_NOT_FOUND = (MAKE_DMHRESULTERROR_R + $021A);
- {$EXTERNALSYM DMUS_E_SCRIPT_VARIABLE_NOT_FOUND}
- (* DMUS_E_SCRIPT_ROUTINE_NOT_FOUND
- *
- * The script does not contain a routine with the specified name.
- *)
- DMUS_E_SCRIPT_ROUTINE_NOT_FOUND = (MAKE_DMHRESULTERROR_R + $021B);
- {$EXTERNALSYM DMUS_E_SCRIPT_ROUTINE_NOT_FOUND}
- (* DMUS_E_SCRIPT_CONTENT_READONLY
- *
- * Scripts variables for content referenced or embedded in a script cannot be set.
- *)
- DMUS_E_SCRIPT_CONTENT_READONLY = (MAKE_DMHRESULTERROR_R + $021C);
- {$EXTERNALSYM DMUS_E_SCRIPT_CONTENT_READONLY}
- (* DMUS_E_SCRIPT_NOT_A_REFERENCE
- *
- * Attempt was made to set a script's variable by reference to a value that was
- * not an object type.
- *)
- DMUS_E_SCRIPT_NOT_A_REFERENCE = (MAKE_DMHRESULTERROR_R + $021D);
- {$EXTERNALSYM DMUS_E_SCRIPT_NOT_A_REFERENCE}
- (* DMUS_E_SCRIPT_VALUE_NOT_SUPPORTED
- *
- * Attempt was made to set a script's variable by value to an object that does
- * not support a default value property.
- *)
- DMUS_E_SCRIPT_VALUE_NOT_SUPPORTED = (MAKE_DMHRESULTERROR_R + $021E);
- {$EXTERNALSYM DMUS_E_SCRIPT_VALUE_NOT_SUPPORTED}
- (* DMUS_E_INVALID_SEGMENTTRIGGERTRACK
- *
- * The file contains an invalid segment trigger track.
- *)
- DMUS_E_INVALID_SEGMENTTRIGGERTRACK = (MAKE_DMHRESULTERROR_R + $0220);
- {$EXTERNALSYM DMUS_E_INVALID_SEGMENTTRIGGERTRACK}
- (* DMUS_E_INVALID_LYRICSTRACK
- *
- * The file contains an invalid lyrics track.
- *)
- DMUS_E_INVALID_LYRICSTRACK = (MAKE_DMHRESULTERROR_R + $0221);
- {$EXTERNALSYM DMUS_E_INVALID_LYRICSTRACK}
- (* DMUS_E_INVALID_PARAMCONTROLTRACK
- *
- * The file contains an invalid parameter control track.
- *)
- DMUS_E_INVALID_PARAMCONTROLTRACK = (MAKE_DMHRESULTERROR_R + $0222);
- {$EXTERNALSYM DMUS_E_INVALID_PARAMCONTROLTRACK}
- (* DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR
- *
- * A script written in AudioVBScript could not be read because it contained a statement that
- * is not allowed by the AudioVBScript language.
- *)
- DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR = (MAKE_DMHRESULTERROR_R + $0223);
- {$EXTERNALSYM DMUS_E_AUDIOVBSCRIPT_SYNTAXERROR}
- (* DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR
- *
- * A script routine written in AudioVBScript failed because an invalid operation occurred. For example,
- * adding the number 3 to a segment object would produce this error. So would attempting to call a routine
- * that doesn't exist.
- *)
- DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR = (MAKE_DMHRESULTERROR_R + $0224);
- {$EXTERNALSYM DMUS_E_AUDIOVBSCRIPT_RUNTIMEERROR}
- (* DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE
- *
- * A script routine written in AudioVBScript failed because a function outside of a script failed to complete.
- * For example, a call to PlaySegment that fails to play because of low memory would return this error.
- *)
- DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE = (MAKE_DMHRESULTERROR_R + $0225);
- {$EXTERNALSYM DMUS_E_AUDIOVBSCRIPT_OPERATIONFAILURE}
- (* DMUS_E_AUDIOPATHS_NOT_VALID
- *
- * The Performance has set up some PChannels using the AssignPChannel command, which
- * makes it not capable of supporting audio paths.
- *)
- DMUS_E_AUDIOPATHS_NOT_VALID = (MAKE_DMHRESULTERROR_R + $0226);
- {$EXTERNALSYM DMUS_E_AUDIOPATHS_NOT_VALID}
- (* DMUS_E_AUDIOPATHS_IN_USE
- *
- * This is the inverse of the previous error.
- * The Performance has set up some audio paths, which makes is incompatible
- * with the calls to allocate pchannels, etc.
- *)
- DMUS_E_AUDIOPATHS_IN_USE = (MAKE_DMHRESULTERROR_R + $0227);
- {$EXTERNALSYM DMUS_E_AUDIOPATHS_IN_USE}
- (* DMUS_E_NO_AUDIOPATH_CONFIG
- *
- * A segment was asked for its embedded audio path configuration,
- * but there isn't any.
- *)
- DMUS_E_NO_AUDIOPATH_CONFIG = (MAKE_DMHRESULTERROR_R + $0228);
- {$EXTERNALSYM DMUS_E_NO_AUDIOPATH_CONFIG}
- (* DMUS_E_AUDIOPATH_INACTIVE
- *
- * An audiopath is inactive, perhaps because closedown was called.
- *)
- DMUS_E_AUDIOPATH_INACTIVE = (MAKE_DMHRESULTERROR_R + $0229);
- {$EXTERNALSYM DMUS_E_AUDIOPATH_INACTIVE}
- (* DMUS_E_AUDIOPATH_NOBUFFER
- *
- * An audiopath failed to create because a requested buffer could not be created.
- *)
- DMUS_E_AUDIOPATH_NOBUFFER = (MAKE_DMHRESULTERROR_R + $022A);
- {$EXTERNALSYM DMUS_E_AUDIOPATH_NOBUFFER}
- (* DMUS_E_AUDIOPATH_NOPORT
- *
- * An audiopath could not be used for playback because it lacked port assignments.
- *)
- DMUS_E_AUDIOPATH_NOPORT = (MAKE_DMHRESULTERROR_R + $022B);
- {$EXTERNALSYM DMUS_E_AUDIOPATH_NOPORT}
- (* DMUS_E_NO_AUDIOPATH
- *
- * Attempt was made to play segment in audiopath mode and there was no audiopath.
- *)
- DMUS_E_NO_AUDIOPATH = (MAKE_DMHRESULTERROR_R + $022C);
- {$EXTERNALSYM DMUS_E_NO_AUDIOPATH}
- (* DMUS_E_INVALIDCHUNK
- *
- * Invalid data was found in a RIFF file chunk.
- *)
- DMUS_E_INVALIDCHUNK = (MAKE_DMHRESULTERROR_R + $022D);
- {$EXTERNALSYM DMUS_E_INVALIDCHUNK}
- (* DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER
- *
- * Attempt was made to create an audiopath that sends to a global effects buffer which did not exist.
- *)
- DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER = (MAKE_DMHRESULTERROR_R + $022E);
- {$EXTERNALSYM DMUS_E_AUDIOPATH_NOGLOBALFXBUFFER}
- (* DMUS_E_INVALID_CONTAINER_OBJECT
- *
- * The file does not contain a valid container object.
- *)
- DMUS_E_INVALID_CONTAINER_OBJECT = (MAKE_DMHRESULTERROR_R + $022F);
- {$EXTERNALSYM DMUS_E_INVALID_CONTAINER_OBJECT}
- (************************************************************************
- * *
- * dmusicc.h -- This module defines the DirectMusic core API's *
- * *
- * Copyright (c) Microsoft Corporation. All rights reserved. *
- * *
- ************************************************************************)
- type
- SAMPLE_TIME = Int64;
- {$EXTERNALSYM SAMPLE_TIME}
- TSampleTime = SAMPLE_TIME;
- PSampleTime = ^TSampleTime;
- SAMPLE_POSITION = Int64;
- {$EXTERNALSYM SAMPLE_POSITION}
- TSamplePosition = SAMPLE_POSITION;
- PSamplePosition = ^TSamplePosition;
- const
- DMUS_MAX_DESCRIPTION = 128;
- {$EXTERNALSYM DMUS_MAX_DESCRIPTION}
- DMUS_MAX_DRIVER = 128;
- {$EXTERNALSYM DMUS_MAX_DRIVER}
- type
- PDMusBufferDesc = ^TDMusBufferDesc;
- _DMUS_BUFFERDESC = packed record
- dwSize: DWORD;
- dwFlags: DWORD;
- guidBufferFormat: TGUID;
- cbBuffer: DWORD;
- end;
- {$EXTERNALSYM _DMUS_BUFFERDESC}
- DMUS_BUFFERDESC = _DMUS_BUFFERDESC;
- {$EXTERNALSYM DMUS_BUFFERDESC}
- TDMusBufferDesc = _DMUS_BUFFERDESC;
- const
- (* DMUS_EFFECT_ flags are used in the dwEffectFlags fields of both DMUS_PORTCAPS
- * and DMUS_PORTPARAMS.
- *)
- DMUS_EFFECT_NONE = $00000000;
- {$EXTERNALSYM DMUS_EFFECT_NONE}
- DMUS_EFFECT_REVERB = $00000001;
- {$EXTERNALSYM DMUS_EFFECT_REVERB}
- DMUS_EFFECT_CHORUS = $00000002;
- {$EXTERNALSYM DMUS_EFFECT_CHORUS}
- DMUS_EFFECT_DELAY = $00000004;
- {$EXTERNALSYM DMUS_EFFECT_DELAY}
- (* For DMUS_PORTCAPS dwClass
- *)
- DMUS_PC_INPUTCLASS = (0);
- {$EXTERNALSYM DMUS_PC_INPUTCLASS}
- DMUS_PC_OUTPUTCLASS = (1);
- {$EXTERNALSYM DMUS_PC_OUTPUTCLASS}
- (* For DMUS_PORTCAPS dwFlags
- *)
- DMUS_PC_DLS = ($00000001); // Supports DLS downloading and DLS level 1.
- {$EXTERNALSYM DMUS_PC_DLS}
- DMUS_PC_EXTERNAL = ($00000002); // External MIDI module.
- {$EXTERNALSYM DMUS_PC_EXTERNAL}
- DMUS_PC_SOFTWARESYNTH = ($00000004); // Software synthesizer.
- {$EXTERNALSYM DMUS_PC_SOFTWARESYNTH}
- DMUS_PC_MEMORYSIZEFIXED = ($00000008); // Memory size is fixed.
- {$EXTERNALSYM DMUS_PC_MEMORYSIZEFIXED}
- DMUS_PC_GMINHARDWARE = ($00000010); // GM sound set is built in, no need to download.
- {$EXTERNALSYM DMUS_PC_GMINHARDWARE}
- DMUS_PC_GSINHARDWARE = ($00000020); // GS sound set is built in.
- {$EXTERNALSYM DMUS_PC_GSINHARDWARE}
- DMUS_PC_XGINHARDWARE = ($00000040); // XG sound set is built in.
- {$EXTERNALSYM DMUS_PC_XGINHARDWARE}
- DMUS_PC_DIRECTSOUND = ($00000080); // Connects to DirectSound via a DSound buffer.
- {$EXTERNALSYM DMUS_PC_DIRECTSOUND}
- DMUS_PC_SHAREABLE = ($00000100); // Synth can be actively shared by multiple apps at once.
- {$EXTERNALSYM DMUS_PC_SHAREABLE}
- DMUS_PC_DLS2 = ($00000200); // Supports DLS2 instruments.
- {$EXTERNALSYM DMUS_PC_DLS2}
- DMUS_PC_AUDIOPATH = ($00000400); // Multiple outputs can be connected to DirectSound for audiopaths.
- {$EXTERNALSYM DMUS_PC_AUDIOPATH}
- DMUS_PC_WAVE = ($00000800); // Supports streaming and one shot waves.
- {$EXTERNALSYM DMUS_PC_WAVE}
- DMUS_PC_SYSTEMMEMORY = ($7FFFFFFF); // Sample memory is system memory.
- {$EXTERNALSYM DMUS_PC_SYSTEMMEMORY}
- type
- PDMusPortCaps = ^TDMusPortCaps;
- _DMUS_PORTCAPS = packed record
- dwSize: DWORD;
- dwFlags: DWORD;
- guidPort: TGUID;
- dwClass: DWORD;
- dwType: DWORD;
- dwMemorySize: DWORD;
- dwMaxChannelGroups: DWORD;
- dwMaxVoices: DWORD;
- dwMaxAudioChannels: DWORD;
- dwEffectFlags: DWORD;
- wszDescription: array[0..DMUS_MAX_DESCRIPTION-1] of WideChar;
- end;
- {$EXTERNALSYM _DMUS_PORTCAPS}
- DMUS_PORTCAPS = _DMUS_PORTCAPS;
- {$EXTERNALSYM DMUS_PORTCAPS}
- TDMusPortCaps = _DMUS_PORTCAPS;
- const
- (* Values for DMUS_PORTCAPS dwType. This field indicates the underlying
- * driver type of the port.
- *)
- DMUS_PORT_WINMM_DRIVER = (0);
- {$EXTERNALSYM DMUS_PORT_WINMM_DRIVER}
- DMUS_PORT_USER_MODE_SYNTH = (1);
- {$EXTERNALSYM DMUS_PORT_USER_MODE_SYNTH}
- DMUS_PORT_KERNEL_MODE = (2);
- {$EXTERNALSYM DMUS_PORT_KERNEL_MODE}
- // These flags (set in dwValidParams) indicate which other members of the
- // DMUS_PORTPARAMS are valid.
- //
- DMUS_PORTPARAMS_VOICES = $00000001;
- {$EXTERNALSYM DMUS_PORTPARAMS_VOICES}
- DMUS_PORTPARAMS_CHANNELGROUPS = $00000002;
- {$EXTERNALSYM DMUS_PORTPARAMS_CHANNELGROUPS}
- DMUS_PORTPARAMS_AUDIOCHANNELS = $00000004;
- {$EXTERNALSYM DMUS_PORTPARAMS_AUDIOCHANNELS}
- DMUS_PORTPARAMS_SAMPLERATE = $00000008;
- {$EXTERNALSYM DMUS_PORTPARAMS_SAMPLERATE}
- DMUS_PORTPARAMS_EFFECTS = $00000020;
- {$EXTERNALSYM DMUS_PORTPARAMS_EFFECTS}
- DMUS_PORTPARAMS_SHARE = $00000040;
- {$EXTERNALSYM DMUS_PORTPARAMS_SHARE}
- DMUS_PORTPARAMS_FEATURES = $00000080; // DirectX 8.0 and above
- {$EXTERNALSYM DMUS_PORTPARAMS_FEATURES}
- type
- PDMusPortParams7 = ^TDMusPortParams7;
- _DMUS_PORTPARAMS = packed record
- dwSize: DWORD;
- dwValidParams: DWORD;
- dwVoices: DWORD;
- dwChannelGroups: DWORD;
- dwAudioChannels: DWORD;
- dwSampleRate: DWORD;
- dwEffectFlags: DWORD;
- fShare: BOOL;
- end;
- {$EXTERNALSYM _DMUS_PORTPARAMS}
- DMUS_PORTPARAMS7 = _DMUS_PORTPARAMS;
- {$EXTERNALSYM DMUS_PORTPARAMS7}
- TDMusPortParams7 = _DMUS_PORTPARAMS;
- PDMusPortParams8 = ^TDMusPortParams8;
- _DMUS_PORTPARAMS8 = packed record
- dwSize: DWORD;
- dwValidParams: DWORD;
- dwVoices: DWORD;
- dwChannelGroups: DWORD;
- dwAudioChannels: DWORD;
- dwSampleRate: DWORD;
- dwEffectFlags: DWORD;
- fShare: BOOL;
- dwFeatures: DWORD;
- end;
- {$EXTERNALSYM _DMUS_PORTPARAMS8}
- DMUS_PORTPARAMS8 = _DMUS_PORTPARAMS8;
- {$EXTERNALSYM DMUS_PORTPARAMS8}
- TDMusPortParams8 = _DMUS_PORTPARAMS8;
- const
- DMUS_PORT_FEATURE_AUDIOPATH = $00000001; // Supports audiopath connection to DSound buffers.
- {$EXTERNALSYM DMUS_PORT_FEATURE_AUDIOPATH}
- DMUS_PORT_FEATURE_STREAMING = $00000002; // Supports streaming waves through the synth.
- {$EXTERNALSYM DMUS_PORT_FEATURE_STREAMING}
- type
- DMUS_PORTPARAMS = DMUS_PORTPARAMS8;
- {$EXTERNALSYM DMUS_PORTPARAMS}
- TDMusPortParams = DMUS_PORTPARAMS;
- PDMusPortParams = PDMusPortParams8;
- PDMusSynthStats = ^TDMusSynthStats;
- _DMUS_SYNTHSTATS = packed record
- dwSize: DWORD; (* Size in bytes of the structure *)
- dwValidStats: DWORD; (* Flags indicating which fields below are valid. *)
- dwVoices: DWORD; (* Average number of voices playing. *)
- dwTotalCPU: DWORD; (* Total CPU usage as percent * 100. *)
- dwCPUPerVoice: DWORD; (* CPU per voice as percent * 100. *)
- dwLostNotes: DWORD; (* Number of notes lost in 1 second. *)
- dwFreeMemory: DWORD; (* Free memory in bytes *)
- lPeakVolume: Longint; (* Decibel level * 100. *)
- end;
- {$EXTERNALSYM _DMUS_SYNTHSTATS}
- DMUS_SYNTHSTATS = _DMUS_SYNTHSTATS;
- {$EXTERNALSYM DMUS_SYNTHSTATS}
- TDMusSynthStats = _DMUS_SYNTHSTATS;
- PDMusSynthStats8 = ^TDMusSynthStats8;
- _DMUS_SYNTHSTATS8 = packed record
- dwSize: DWORD; (* Size in bytes of the structure *)
- dwValidStats: DWORD; (* Flags indicating which fields below are valid. *)
- dwVoices: DWORD; (* Average number of voices playing. *)
- dwTotalCPU: DWORD; (* Total CPU usage as percent * 100. *)
- dwCPUPerVoice: DWORD; (* CPU per voice as percent * 100. *)
- dwLostNotes: DWORD; (* Number of notes lost in 1 second. *)
- dwFreeMemory: DWORD; (* Free memory in bytes *)
- lPeakVolume: Longint; (* Decibel level * 100. *)
- dwSynthMemUse: DWORD; (* Memory used by synth wave data *)
- end;
- {$EXTERNALSYM _DMUS_SYNTHSTATS8}
- DMUS_SYNTHSTATS8 = _DMUS_SYNTHSTATS8;
- {$EXTERNALSYM DMUS_SYNTHSTATS8}
- TDMusSynthStats8 = _DMUS_SYNTHSTATS8;
- const
- DMUS_SYNTHSTATS_VOICES = (1 shl 0);
- {$EXTERNALSYM DMUS_SYNTHSTATS_VOICES}
- DMUS_SYNTHSTATS_TOTAL_CPU = (1 shl 1);
- {$EXTERNALSYM DMUS_SYNTHSTATS_TOTAL_CPU}
- DMUS_SYNTHSTATS_CPU_PER_VOICE = (1 shl 2);
- {$EXTERNALSYM DMUS_SYNTHSTATS_CPU_PER_VOICE}
- DMUS_SYNTHSTATS_LOST_NOTES = (1 shl 3);
- {$EXTERNALSYM DMUS_SYNTHSTATS_LOST_NOTES}
- DMUS_SYNTHSTATS_PEAK_VOLUME = (1 shl 4);
- {$EXTERNALSYM DMUS_SYNTHSTATS_PEAK_VOLUME}
- DMUS_SYNTHSTATS_FREE_MEMORY = (1 shl 5);
- {$EXTERNALSYM DMUS_SYNTHSTATS_FREE_MEMORY}
- DMUS_SYNTHSTATS_SYSTEMMEMORY = DMUS_PC_SYSTEMMEMORY;
- {$EXTERNALSYM DMUS_SYNTHSTATS_SYSTEMMEMORY}
- type
- PDMusWavesReverbParams = ^TDMusWavesReverbParams;
- _DMUS_WAVES_REVERB_PARAMS = packed record
- fInGain: Single; (* Input gain in dB (to avoid output overflows) *)
- fReverbMix: Single; (* Reverb mix in dB. 0dB means 100% wet reverb (no direct signal)
- Negative values gives less wet signal.
- The coeficients are calculated so that the overall output level stays
- (approximately) constant regardless of the ammount of reverb mix. *)
- fReverbTime: Single; (* The reverb decay time, in milliseconds. *)
- fHighFreqRTRatio: Single; (* The ratio of the high frequencies to the global reverb time.
- Unless very 'splashy-bright' reverbs are wanted, this should be set to
- a value < 1.0.
- For example if dRevTime==1000ms and dHighFreqRTRatio=0.1 than the
- decay time for high frequencies will be 100ms.*)
- end;
- {$EXTERNALSYM _DMUS_WAVES_REVERB_PARAMS}
- DMUS_WAVES_REVERB_PARAMS = _DMUS_WAVES_REVERB_PARAMS;
- {$EXTERNALSYM DMUS_WAVES_REVERB_PARAMS}
- TDMusWavesReverbParams = _DMUS_WAVES_REVERB_PARAMS;
- (* Note: Default values for Reverb are:
- fInGain = 0.0dB (no change in level)
- fReverbMix = -10.0dB (a reasonable reverb mix)
- fReverbTime = 1000.0ms (one second global reverb time)
- fHighFreqRTRatio = 0.001 (the ratio of the high frequencies to the global reverb time)
- *)
- DMUS_CLOCKTYPE = (
- DMUS_CLOCK_SYSTEM {= 0},
- DMUS_CLOCK_WAVE {= 1}
- );
- {$EXTERNALSYM DMUS_CLOCKTYPE}
- TDMusClockType = DMUS_CLOCKTYPE;
- const
- DMUS_CLOCKF_GLOBAL = $00000001;
- {$EXTERNALSYM DMUS_CLOCKF_GLOBAL}
- type
- PDMusClockInfo7 = ^TDMusClockInfo7;
- _DMUS_CLOCKINFO7 = packed record
- dwSize: DWORD;
- ctType: TDMusClockType;
- guidClock: TGUID; // Identifies this time source
- wszDescription: array[0..DMUS_MAX_DESCRIPTION-1] of WideChar;
- end;
- {$EXTERNALSYM _DMUS_CLOCKINFO7}
- DMUS_CLOCKINFO7 = _DMUS_CLOCKINFO7;
- {$EXTERNALSYM DMUS_CLOCKINFO7}
- TDMusClockInfo7 = _DMUS_CLOCKINFO7;
- PDMusClockInfo8 = ^TDMusClockInfo8;
- _DMUS_CLOCKINFO8 = packed record
- dwSize: DWORD;
- ctType: TDMusClockType;
- guidClock: TGUID; // Identifies this time source
- wszDescription: array[0..DMUS_MAX_DESCRIPTION-1] of WideChar;
- dwFlags: DWORD;
- end;
- {$EXTERNALSYM _DMUS_CLOCKINFO8}
- DMUS_CLOCKINFO8 = _DMUS_CLOCKINFO8;
- {$EXTERNALSYM DMUS_CLOCKINFO8}
- TDMusClockInfo8 = _DMUS_CLOCKINFO8;
- DMUS_CLOCKINFO = DMUS_CLOCKINFO8;
- {$EXTERNALSYM DMUS_CLOCKINFO}
- TDMusClockInfo = DMUS_CLOCKINFO;
- PDMusClockInfo = PDMusClockInfo8;
- const
- (* Default bus identifiers
- *
- * The first 17 are direct mappings to the destinations defined in both
- * the MMA DLS Level 2 specification and the Microsoft Multi-Channel audio
- * specification.
- *)
- DSBUSID_FIRST_SPKR_LOC = 0;
- {$EXTERNALSYM DSBUSID_FIRST_SPKR_LOC}
- DSBUSID_FRONT_LEFT = 0;
- {$EXTERNALSYM DSBUSID_FRONT_LEFT}
- DSBUSID_LEFT = 0; // Front left is also just left
- {$EXTERNALSYM DSBUSID_LEFT}
- DSBUSID_FRONT_RIGHT = 1;
- {$EXTERNALSYM DSBUSID_FRONT_RIGHT}
- DSBUSID_RIGHT = 1; // Ditto front right
- {$EXTERNALSYM DSBUSID_RIGHT}
- DSBUSID_FRONT_CENTER = 2;
- {$EXTERNALSYM DSBUSID_FRONT_CENTER}
- DSBUSID_LOW_FREQUENCY = 3;
- {$EXTERNALSYM DSBUSID_LOW_FREQUENCY}
- DSBUSID_BACK_LEFT = 4;
- {$EXTERNALSYM DSBUSID_BACK_LEFT}
- DSBUSID_BACK_RIGHT = 5;
- {$EXTERNALSYM DSBUSID_BACK_RIGHT}
- DSBUSID_FRONT_LEFT_OF_CENTER = 6;
- {$EXTERNALSYM DSBUSID_FRONT_LEFT_OF_CENTER}
- DSBUSID_FRONT_RIGHT_OF_CENTER = 7;
- {$EXTERNALSYM DSBUSID_FRONT_RIGHT_OF_CENTER}
- DSBUSID_BACK_CENTER = 8;
- {$EXTERNALSYM DSBUSID_BACK_CENTER}
- DSBUSID_SIDE_LEFT = 9;
- {$EXTERNALSYM DSBUSID_SIDE_LEFT}
- DSBUSID_SIDE_RIGHT = 10;
- {$EXTERNALSYM DSBUSID_SIDE_RIGHT}
- DSBUSID_TOP_CENTER = 11;
- {$EXTERNALSYM DSBUSID_TOP_CENTER}
- DSBUSID_TOP_FRONT_LEFT = 12;
- {$EXTERNALSYM DSBUSID_TOP_FRONT_LEFT}
- DSBUSID_TOP_FRONT_CENTER = 13;
- {$EXTERNALSYM DSBUSID_TOP_FRONT_CENTER}
- DSBUSID_TOP_FRONT_RIGHT = 14;
- {$EXTERNALSYM DSBUSID_TOP_FRONT_RIGHT}
- DSBUSID_TOP_BACK_LEFT = 15;
- {$EXTERNALSYM DSBUSID_TOP_BACK_LEFT}
- DSBUSID_TOP_BACK_CENTER = 16;
- {$EXTERNALSYM DSBUSID_TOP_BACK_CENTER}
- DSBUSID_TOP_BACK_RIGHT = 17;
- {$EXTERNALSYM DSBUSID_TOP_BACK_RIGHT}
- DSBUSID_LAST_SPKR_LOC = 17;
- {$EXTERNALSYM DSBUSID_LAST_SPKR_LOC}
- // #define DSBUSID_IS_SPKR_LOC(id) ( ((id) >= DSBUSID_FIRST_SPKR_LOC) && ((id) <= DSBUSID_LAST_SPKR_LOC) )
- function DSBUSID_IS_SPKR_LOC(id: Integer): Boolean;
- {$EXTERNALSYM DSBUSID_IS_SPKR_LOC}
- const
- (* These bus identifiers are for the standard DLS effect sends
- *)
- DSBUSID_REVERB_SEND = 64;
- {$EXTERNALSYM DSBUSID_REVERB_SEND}
- DSBUSID_CHORUS_SEND = 65;
- {$EXTERNALSYM DSBUSID_CHORUS_SEND}
- (* Dynamic bus identifiers start here. See the documentation for how
- * synthesizers map the output of voices to static and dynamic
- * bus identifiers.
- *)
- DSBUSID_DYNAMIC_0 = 512;
- {$EXTERNALSYM DSBUSID_DYNAMIC_0}
- (* Null bus, used to identify busses that have no function mapping.
- *)
- DSBUSID_NULL = $FFFFFFFF;
- {$EXTERNALSYM DSBUSID_NULL}
- (* Standard values for voice priorities. Numerically higher priorities are higher in priority.
- * These priorities are used to set the voice priority for all voices on a channel. They are
- * used in the dwPriority parameter of IDirectMusicPort::GetPriority and returned in the
- * lpwPriority parameter of pdwPriority.
- *
- * These priorities are shared with DirectSound.
- *)
- const
- DAUD_CRITICAL_VOICE_PRIORITY = ($F0000000);
- {$EXTERNALSYM DAUD_CRITICAL_VOICE_PRIORITY}
- DAUD_HIGH_VOICE_PRIORITY = ($C0000000);
- {$EXTERNALSYM DAUD_HIGH_VOICE_PRIORITY}
- DAUD_STANDARD_VOICE_PRIORITY = ($80000000);
- {$EXTERNALSYM DAUD_STANDARD_VOICE_PRIORITY}
- DAUD_LOW_VOICE_PRIORITY = ($40000000);
- {$EXTERNALSYM DAUD_LOW_VOICE_PRIORITY}
- DAUD_PERSIST_VOICE_PRIORITY = ($10000000);
- {$EXTERNALSYM DAUD_PERSIST_VOICE_PRIORITY}
- (* These are the default priorities assigned if not overridden. By default priorities are
- * equal across channel groups (e.g. channel 5 on channel group 1 has the same priority as
- * channel 5 on channel group 2).
- *
- * In accordance with DLS level 1, channel 10 has the highest priority, followed by 1 through 16
- * except for 10.
- *)
- DAUD_CHAN1_VOICE_PRIORITY_OFFSET = ($0000000E);
- {$EXTERNALSYM DAUD_CHAN1_VOICE_PRIORITY_OFFSET}
- DAUD_CHAN2_VOICE_PRIORITY_OFFSET = ($0000000D);
- {$EXTERNALSYM DAUD_CHAN2_VOICE_PRIORITY_OFFSET}
- DAUD_CHAN3_VOICE_PRIORITY_OFFSET = ($0000000C);
- {$EXTERNALSYM DAUD_CHAN3_VOICE_PRIORITY_OFFSET}
- DAUD_CHAN4_VOICE_PRIORITY_OFFSET = ($0000000B);
- {$EXTERNALSYM DAUD_CHAN4_VOICE_PRIORITY_OFFSET}
- DAUD_CHAN5_VOICE_PRIORITY_OFFSET = ($0000000A);
- {$EXTERNALSYM DAUD_CHAN5_VOICE_PRIORITY_OFFSET}
- DAUD_CHAN6_VOICE_PRIORITY_OFFSET = ($00000009);
- {$EXTERNALSYM DAUD_CHAN6_VOICE_PRIORITY_OFFSET}
- DAUD_CHAN7_VOICE_PRIORITY_OFFSET = ($00000008);
- {$EXTERNALSYM DAUD_CHAN7_VOICE_PRIORITY_OFFSET}
- DAUD_CHAN8_VOICE_PRIORITY_OFFSET = ($00000007);
- {$EXTERNALSYM DAUD_CHAN8_VOICE_PRIORITY_OFFSET}
- DAUD_CHAN9_VOICE_PRIORITY_OFFSET = ($00000006);
- {$EXTERNALSYM DAUD_CHAN9_VOICE_PRIORITY_OFFSET}
- DAUD_CHAN10_VOICE_PRIORITY_OFFSET = ($0000000F);
- {$EXTERNALSYM DAUD_CHAN10_VOICE_PRIORITY_OFFSET}
- DAUD_CHAN11_VOICE_PRIORITY_OFFSET = ($00000005);
- {$EXTERNALSYM DAUD_CHAN11_VOICE_PRIORITY_OFFSET}
- DAUD_CHAN12_VOICE_PRIORITY_OFFSET = ($00000004);
- {$EXTERNALSYM DAUD_CHAN12_VOICE_PRIORITY_OFFSET}
- DAUD_CHAN13_VOICE_PRIORITY_OFFSET = ($00000003);
- {$EXTERNALSYM DAUD_CHAN13_VOICE_PRIORITY_OFFSET}
- DAUD_CHAN14_VOICE_PRIORITY_OFFSET = ($00000002);
- {$EXTERNALSYM DAUD_CHAN14_VOICE_PRIORITY_OFFSET}
- DAUD_CHAN15_VOICE_PRIORITY_OFFSET = ($00000001);
- {$EXTERNALSYM DAUD_CHAN15_VOICE_PRIORITY_OFFSET}
- DAUD_CHAN16_VOICE_PRIORITY_OFFSET = ($00000000);
- {$EXTERNALSYM DAUD_CHAN16_VOICE_PRIORITY_OFFSET}
- DAUD_CHAN1_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN1_VOICE_PRIORITY_OFFSET);
- {$EXTERNALSYM DAUD_CHAN1_DEF_VOICE_PRIORITY}
- DAUD_CHAN2_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN2_VOICE_PRIORITY_OFFSET);
- {$EXTERNALSYM DAUD_CHAN2_DEF_VOICE_PRIORITY}
- DAUD_CHAN3_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN3_VOICE_PRIORITY_OFFSET);
- {$EXTERNALSYM DAUD_CHAN3_DEF_VOICE_PRIORITY}
- DAUD_CHAN4_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN4_VOICE_PRIORITY_OFFSET);
- {$EXTERNALSYM DAUD_CHAN4_DEF_VOICE_PRIORITY}
- DAUD_CHAN5_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN5_VOICE_PRIORITY_OFFSET);
- {$EXTERNALSYM DAUD_CHAN5_DEF_VOICE_PRIORITY}
- DAUD_CHAN6_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN6_VOICE_PRIORITY_OFFSET);
- {$EXTERNALSYM DAUD_CHAN6_DEF_VOICE_PRIORITY}
- DAUD_CHAN7_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN7_VOICE_PRIORITY_OFFSET);
- {$EXTERNALSYM DAUD_CHAN7_DEF_VOICE_PRIORITY}
- DAUD_CHAN8_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN8_VOICE_PRIORITY_OFFSET);
- {$EXTERNALSYM DAUD_CHAN8_DEF_VOICE_PRIORITY}
- DAUD_CHAN9_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN9_VOICE_PRIORITY_OFFSET);
- {$EXTERNALSYM DAUD_CHAN9_DEF_VOICE_PRIORITY}
- DAUD_CHAN10_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN10_VOICE_PRIORITY_OFFSET);
- {$EXTERNALSYM DAUD_CHAN10_DEF_VOICE_PRIORITY}
- DAUD_CHAN11_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN11_VOICE_PRIORITY_OFFSET);
- {$EXTERNALSYM DAUD_CHAN11_DEF_VOICE_PRIORITY}
- DAUD_CHAN12_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN12_VOICE_PRIORITY_OFFSET);
- {$EXTERNALSYM DAUD_CHAN12_DEF_VOICE_PRIORITY}
- DAUD_CHAN13_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN13_VOICE_PRIORITY_OFFSET);
- {$EXTERNALSYM DAUD_CHAN13_DEF_VOICE_PRIORITY}
- DAUD_CHAN14_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN14_VOICE_PRIORITY_OFFSET);
- {$EXTERNALSYM DAUD_CHAN14_DEF_VOICE_PRIORITY}
- DAUD_CHAN15_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN15_VOICE_PRIORITY_OFFSET);
- {$EXTERNALSYM DAUD_CHAN15_DEF_VOICE_PRIORITY}
- DAUD_CHAN16_DEF_VOICE_PRIORITY = (DAUD_STANDARD_VOICE_PRIORITY or DAUD_CHAN16_VOICE_PRIORITY_OFFSET);
- {$EXTERNALSYM DAUD_CHAN16_DEF_VOICE_PRIORITY}
- type
- IDirectMusicBuffer = interface;
- IDirectMusicPort = interface;
- PIReferenceClock = ^IReferenceClock;
- PIDirectSound = ^IDirectSound;
- PIDirectMusic = ^IDirectMusic;
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusic);'}
- {$EXTERNALSYM IDirectMusic}
- IDirectMusic = interface(IUnknown)
- ['{6536115a-7b2d-11d2-ba18-0000f875ac12}']
- (* IDirectMusic *)
- function EnumPort(dwIndex: DWORD; var pPortCaps: TDMusPortCaps): HResult; stdcall;
- function CreateMusicBuffer(var pBufferDesc: TDMusBufferDesc;
- out ppBuffer: IDirectMusicBuffer; pUnkOuter: IUnknown): HResult; stdcall;
- function CreatePort(const rclsidPort: TGUID; const pPortParams: TDMusPortParams;
- out ppPort: IDirectMusicPort; pUnkOuter: IUnknown): HResult; stdcall;
- function EnumMasterClock(dwIndex: DWORD; var lpClockInfo: TDMusClockInfo): HResult; stdcall;
- function GetMasterClock(pguidClock: PGUID; ppReferenceClock: PIReferenceClock): HResult; stdcall;
- function SetMasterClock(const rguidClock: TGUID): HResult; stdcall;
- function Activate(fEnable: BOOL): HResult; stdcall;
- function GetDefaultPort(out pguidPort: TGUID): HResult; stdcall;
- function SetDirectSound(pDirectSound: IDirectSound; hWnd: HWND): HResult; stdcall;
- end;
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusic8);'}
- {$EXTERNALSYM IDirectMusic8}
- IDirectMusic8 = interface(IDirectMusic)
- ['{2d3629f7-813d-4939-8508-f05c6b75fd97}']
- (* IDirectMusic8 *)
- function SetExternalMasterClock(pClock: IReferenceClock): HResult; stdcall;
- end;
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicBuffer);'}
- {$EXTERNALSYM IDirectMusicBuffer}
- IDirectMusicBuffer = interface(IUnknown)
- ['{d2ac2878-b39b-11d1-8704-00600893b1bd}']
- (* IDirectMusicBuffer *)
- function Flush: HResult; stdcall;
- function TotalTime(out prtTime: TReferenceTime): HResult; stdcall;
- function PackStructured(const rt: TReferenceTime; dwChannelGroup: DWORD;
- dwChannelMessage: DWORD): HResult; stdcall;
- function PackUnstructured(const rt: TReferenceTime; dwChannelGroup: DWORD;
- cb: DWORD; const lpb): HResult; stdcall;
- function ResetReadPtr : HResult; stdcall;
- function GetNextEvent(out prt: TReferenceTime; out pdwChannelGroup: DWORD;
- out pdwLength: DWORD; out ppData: Pointer): HResult; stdcall;
- function GetRawBufferPtr(out ppData: Pointer): HResult; stdcall;
- function GetStartTime(out prt: TReferenceTime): HResult; stdcall;
- function GetUsedBytes(out pcb: DWORD): HResult; stdcall;
- function GetMaxBytes(out pcb: DWORD): HResult; stdcall;
- function GetBufferFormat(out pGuidFormat: TGUID): HResult; stdcall;
- function SetStartTime(const rt: TReferenceTime): HResult; stdcall;
- function SetUsedBytes(cb: DWORD): HResult; stdcall;
- end;
- IDirectMusicBuffer8 = IDirectMusicBuffer;
- {$NODEFINE IDirectMusicBuffer8}
- {$HPPEMIT 'typedef _di_IDirectMusicBuffer _di_IDirectMusicBuffer8;'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicInstrument);'}
- {$EXTERNALSYM IDirectMusicInstrument}
- IDirectMusicInstrument = interface(IUnknown)
- ['{d2ac287d-b39b-11d1-8704-00600893b1bd}']
- (* IDirectMusicInstrument *)
- function GetPatch(out pdwPatch: DWORD): HResult; stdcall;
- function SetPatch(dwPatch: DWORD): HResult; stdcall;
- end;
- IDirectMusicInstrument8 = IDirectMusicInstrument;
- {$NODEFINE IDirectMusicInstrument8}
- {$HPPEMIT 'typedef _di_IDirectMusicInstrument _di_IDirectMusicInstrument8;'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicDownloadedInstrument);'}
- {$EXTERNALSYM IDirectMusicDownloadedInstrument}
- IDirectMusicDownloadedInstrument = interface(IUnknown)
- ['{d2ac287e-b39b-11d1-8704-00600893b1bd}']
- (* IDirectMusicDownloadedInstrument *)
- (* None at this time *)
- end;
- IDirectMusicDownloadedInstrument8 = IDirectMusicDownloadedInstrument;
- {$NODEFINE IDirectMusicDownloadedInstrument8}
- {$HPPEMIT 'typedef _di_IDirectMusicDownloadedInstrument _di_IDirectMusicDownloadedInstrument8;'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicCollection);'}
- {$EXTERNALSYM IDirectMusicCollection}
- IDirectMusicCollection = interface(IUnknown)
- ['{d2ac287c-b39b-11d1-8704-00600893b1bd}']
- (* IDirectMusicCollection *)
- function GetInstrument(dwPatch: DWORD; out ppInstrument: IDirectMusicInstrument): HResult; stdcall;
- function EnumInstrument(dwIndex: DWORD; out pdwPatch: DWORD;
- pwszName: PWideChar; dwNameLen: DWORD): HResult; stdcall;
- end;
- IDirectMusicCollection8 = IDirectMusicCollection;
- {$NODEFINE IDirectMusicCollection8}
- {$HPPEMIT 'typedef _di_IDirectMusicCollection _di_IDirectMusicCollection8;'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicDownload);'}
- {$EXTERNALSYM IDirectMusicDownload}
- IDirectMusicDownload = interface(IUnknown)
- ['{d2ac287b-b39b-11d1-8704-00600893b1bd}']
- (* IDirectMusicDownload *)
- function GetBuffer(out ppvBuffer: Pointer; out pdwSize: DWORD): HResult; stdcall;
- end;
- IDirectMusicDownload8 = IDirectMusicDownload;
- {$NODEFINE IDirectMusicDownload8}
- {$HPPEMIT 'typedef _di_IDirectMusicDownload _di_IDirectMusicDownload8;'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicPortDownload);'}
- {$EXTERNALSYM IDirectMusicPortDownload}
- IDirectMusicPortDownload = interface(IUnknown)
- ['{d2ac287a-b39b-11d1-8704-00600893b1bd}']
- (* IDirectMusicPortDownload *)
- function GetBuffer(dwDLId: DWORD; out ppIDMDownload: IDirectMusicDownload): HResult; stdcall;
- function AllocateBuffer(dwSize: DWORD; out ppIDMDownload: IDirectMusicDownload): HResult; stdcall;
- function GetDLId(out pdwStartDLId: DWORD; dwCount: DWORD): HResult; stdcall;
- function GetAppend(out pdwAppend: DWORD): HResult; stdcall;
- function Download(pIDMDownload: IDirectMusicDownload): HResult; stdcall;
- function Unload(pIDMDownload: IDirectMusicDownload): HResult; stdcall;
- end;
- IDirectMusicPortDownload8 = IDirectMusicPortDownload;
- {$NODEFINE IDirectMusicPortDownload8}
- {$HPPEMIT 'typedef _di_IDirectMusicPortDownload _di_IDirectMusicPortDownload8;'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicPort);'}
- {$EXTERNALSYM IDirectMusicPort}
- IDirectMusicPort = interface(IUnknown)
- ['{08f2d8c9-37c2-11d2-b9f9-0000f875ac12}']
- (* IDirectMusicPort *)
- function PlayBuffer(pBuffer: IDirectMusicBuffer): HResult; stdcall;
- function SetReadNotificationHandle(hEvent: THANDLE): HResult; stdcall;
- function Read(pBuffer: IDirectMusicBuffer): HResult; stdcall;
- function DownloadInstrument(pInstrument: IDirectMusicInstrument;
- out ppDownloadedInstrument: IDirectMusicDownloadedInstrument;
- pNoteRanges: PDMusNoteRange; dwNumNoteRanges: DWORD): HResult; stdcall;
- function UnloadInstrument(pDownloadedInstrument: IDirectMusicDownloadedInstrument): HResult; stdcall;
- function GetLatencyClock(out ppClock: IReferenceClock): HResult; stdcall;
- function GetRunningStats(var pStats: TDMusSynthStats): HResult; stdcall;
- function Compact: HResult; stdcall;
- function GetCaps(var pPortCaps: TDMusPortCaps): HResult; stdcall;
- function DeviceIoControl(dwIoControlCode: DWORD; const lpInBuffer; nInBufferSize: DWORD;
- out lpOutBuffer; nOutBufferSize: DWORD; out lpBytesReturned: DWORD;
- var lpOverlapped: TOVERLAPPED): HResult; stdcall;
- function SetNumChannelGroups(dwChannelGroups: DWORD): HResult; stdcall;
- function GetNumChannelGroups(out pdwChannelGroups: DWORD): HResult; stdcall;
- function Activate(fActive: BOOL): HResult; stdcall;
- function SetChannelPriority(dwChannelGroup, dwChannel, dwPriority: DWORD): HResult; stdcall;
- function GetChannelPriority(dwChannelGroup, dwChannel: DWORD; out pdwPriority: DWORD): HResult; stdcall;
- function SetDirectSound(pDirectSound: IDirectSound; pDirectSoundBuffer: IDirectSoundBuffer): HResult; stdcall;
- function GetFormat(pWaveFormatEx: PWaveFormatEx; var pdwWaveFormatExSize: DWORD;
- out pdwBufferSize: DWORD): HResult; stdcall;
- end;
- IDirectMusicPort8 = IDirectMusicPort;
- {$NODEFINE IDirectMusicPort8}
- {$HPPEMIT 'typedef _di_IDirectMusicPort _di_IDirectMusicPort8;'}
- {$HPPEMIT 'DECLARE_DINTERFACE_TYPE(IDirectMusicThru);'}
- {$EXTERNALSYM IDirectMusicThru}
- IDirectMusicThru = interface(IUnknown)
- ['{ced153e7-3606-11d2-b9f9-0000f875ac12}']
- (* IDirectMusicThru *)
- function ThruChannel(dwSourceChannelGroup, dwSourceChannel, dwDestinationChannelGroup,
- dwDestinationChannel: DWORD; pDestinationPort: IDirectMusicPort): HResult; stdcall;
- end;
- IDirectMusicThru8 = IDirectMusicThru;
- {$NODEFINE IDirectMusicThru8}
- {$HPPEMIT 'typedef _di_IDirectMusicThru _di_IDirectMusicThru8;'}
- //Translator: IReferenceClock is already defined in DirectSound.pas
- IReferenceClock = DirectSound.IReferenceClock;
- {$NODEFINE IReferenceClock}
- (*
- IReferenceClock = interface(IUnknown)
- ['{56a86897-0ad4-11ce-b03a-0020af0ba770}'] *) {
- (* IReferenceClock *)
- (* get the time now *)
- function GetTime(out pTime: TReferenceTime): HResult; stdcall;
- (* ask for an async notification that a time has elapsed *)
- function AdviseTime(const baseTime, (* base time *)
- streamTime: TReferenceTime; (* stream offset time *)
- hEvent: THANDLE; (* advise via this event *)
- var pdwAdviseCookie: DWORD): HResult; stdcall; (* where your cookie goes *)
- (* ask for an async periodic notification that a time has elapsed *)
- function AdvisePeriodic(const startTime, (* starting at this time *)
- periodTime: TReferenceTime; (* time between notifications *)
- hSemaphore: THANDLE; (* advise via a semaphore *)
- var pdwAdviseCookie: DWORD): HResult; stdcall; (* where your cookie goes *)
- (* cancel a request for notification *)
- function Unadvise(dwAdviseCookie: DWORD): HResult; stdcall;
- end;
- }
- IID_IReferenceClock = IReferenceClock;
- {$EXTERNALSYM IID_IReferenceClock}
- const
- CLSID_DirectMusic: TGUID = '{636b9f10-0c7d-11d1-95b2-0020afdc7421}';
- {$EXTERNALSYM CLSID_DirectMusic}
- CLSID_DirectMusicCollection: TGUID = '{480ff4b0-28b2-11d1-bef7-00c04fbf8fef}';
- {$EXTERNALSYM CLSID_DirectMusicCollection}
- CLSID_DirectMusicSynth: TGUID = '{58C2B4D0-46E7-11D1-89AC-00A0C9054129}';
- {$EXTERNALSYM CLSID_DirectMusicSynth}
- // Alternate interface ID for IID_IDirectMusic, available in DX7 release and after.
- IID_IDirectMusic2: TGUID = '{6fc2cae1-bc78-11d2-afa6-00aa0024d8b6}';
- {$EXTERNALSYM IID_IDirectMusic2}
- type
- IID_IDirectMusic = IDirectMusic;
- {$EXTERNALSYM IID_IDirectMusic}
- IID_IDirectMusicBuffer = IDirectMusicBuffer;
- {$EXTERNALSYM IID_IDirectMusicBuffer}
- IID_IDirectMusicPort = IDirectMusicPort;
- {$EXTERNALSYM IID_IDirectMusicPort}
- IID_IDirectMusicThru = IDirectMusicThru;
- {$EXTERNALSYM IID_IDirectMusicThru}
- IID_IDirectMusicPortDownload = IDirectMusicPortDownload;
- {$EXTERNALSYM IID_IDirectMusicPortDownload}
- IID_IDirectMusicDownload = IDirectMusicDownload;
- {$EXTERNALSYM IID_IDirectMusicDownload}
- IID_IDirectMusicCollection = IDirectMusicCollection;
- {$EXTERNALSYM IID_IDirectMusicCollection}
- IID_IDirectMusicInstrument = IDirectMusicInstrument;
- {$EXTERNALSYM IID_IDirectMusicInstrument}
- IID_IDirectMusicDownloadedInstrument = IDirectMusicDownloadedInstrument;
- {$EXTERNALSYM IID_IDirectMusicDownloadedInstrument}
- IID_IDirectMusic8 = IDirectMusic8;
- {$EXTERNALSYM IID_IDirectMusic8}
- IID_IDirectMusicThru8 = IID_IDirectMusicThru;
- {$EXTERNALSYM IID_IDirectMusicThru8}
- IID_IDirectMusicPortDownload8 = IID_IDirectMusicPortDownload;
- {$EXTERNALSYM IID_IDirectMusicPortDownload8}
- IID_IDirectMusicDownload8 = IID_IDirectMusicDownload;
- {$EXTERNALSYM IID_IDirectMusicDownload8}
- IID_IDirectMusicCollection8 = IID_IDirectMusicCollection;
- {$EXTERNALSYM IID_IDirectMusicCollection8}
- IID_IDirectMusicInstrument8 = IID_IDirectMusicInstrument;
- {$EXTERNALSYM IID_IDirectMusicInstrument8}
- IID_IDirectMusicDownloadedInstrument8 = IID_IDirectMusicDownloadedInstrument;
- {$EXTERNALSYM IID_IDirectMusicDownloadedInstrument8}
- IID_IDirectMusicPort8 = IID_IDirectMusicPort;
- {$EXTERNALSYM IID_IDirectMusicPort8}
- const
- (* Property Query GUID_DMUS_PROP_GM_Hardware - Local GM set, no need to download
- * Property Query GUID_DMUS_PROP_GS_Hardware - Local GS set, no need to download
- * Property Query GUID_DMUS_PROP_XG_Hardware - Local XG set, no need to download
- * Property Query GUID_DMUS_PROP_DLS1 - Support DLS level 1
- * Property Query GUID_DMUS_PROP_INSTRUMENT2 - Support new INSTRUMENT2 download format
- * Property Query GUID_DMUS_PROP_XG_Capable - Support minimum requirements of XG
- * Property Query GUID_DMUS_PROP_GS_Capable - Support minimum requirements of GS
- * Property Query GUID_DMUS_PROP_SynthSink_DSOUND - Synthsink talks to DSound
- * Property Query GUID_DMUS_PROP_SynthSink_WAVE - Synthsink talks to Wave device
- *
- * Item 0: Supported
- * Returns a DWORD which is non-zero if the feature is supported
- *)
- GUID_DMUS_PROP_GM_Hardware: TGUID = '{178f2f24-c364-11d1-a760-0000f875ac12}';
- {$EXTERNALSYM GUID_DMUS_PROP_GM_Hardware}
- GUID_DMUS_PROP_GS_Hardware: TGUID = '{178f2f25-c364-11d1-a760-0000f875ac12}';
- {$EXTERNALSYM GUID_DMUS_PROP_GS_Hardware}
- GUID_DMUS_PROP_XG_Hardware: TGUID = '{178f2f26-c364-11d1-a760-0000f875ac12}';
- {$EXTERNALSYM GUID_DMUS_PROP_XG_Hardware}
- GUID_DMUS_PROP_XG_Capable: TGUID = '{6496aba1-61b0-11d2-afa6-00aa0024d8b6}';
- {$EXTERNALSYM GUID_DMUS_PROP_XG_Capable}
- GUID_DMUS_PROP_GS_Capable: TGUID = '{6496aba2-61b0-11d2-afa6-00aa0024d8b6}';
- {$EXTERNALSYM GUID_DMUS_PROP_GS_Capable}
- GUID_DMUS_PROP_DLS1: TGUID = '{178f2f27-c364-11d1-a760-0000f875ac12}';
- {$EXTERNALSYM GUID_DMUS_PROP_DLS1}
- GUID_DMUS_PROP_DLS2: TGUID = '{f14599e5-4689-11d2-afa6-00aa0024d8b6}';
- {$EXTERNALSYM GUID_DMUS_PROP_DLS2}
- GUID_DMUS_PROP_INSTRUMENT2: TGUID = '{865fd372-9f67-11d2-872a-00600893b1bd}';
- {$EXTERNALSYM GUID_DMUS_PROP_INSTRUMENT2}
- GUID_DMUS_PROP_SynthSink_DSOUND: TGUID = '{0aa97844-c877-11d1-870c-00600893b1bd}';
- {$EXTERNALSYM GUID_DMUS_PROP_SynthSink_DSOUND}
- GUID_DMUS_PROP_SynthSink_WAVE: TGUID = '{0aa97845-c877-11d1-870c-00600893b1bd}';
- {$EXTERNALSYM GUID_DMUS_PROP_SynthSink_WAVE}
- GUID_DMUS_PROP_SampleMemorySize: TGUID = '{178f2f28-c364-11d1-a760-0000f875ac12}';
- {$EXTERNALSYM GUID_DMUS_PROP_SampleMemorySize}
- GUID_DMUS_PROP_SamplePlaybackRate: TGUID = '{2a91f713-a4bf-11d2-bbdf-00600833dbd8}';
- {$EXTERNALSYM GUID_DMUS_PROP_SamplePlaybackRate}
- (* Property Get/Set GUID_DMUS_PROP_WriteLatency
- *
- * Item 0: Synth buffer write latency, in milliseconds
- * Get/Set SynthSink latency, the average time after the play head that the next buffer gets written.
- *)
- GUID_DMUS_PROP_WriteLatency: TGUID = '{268a0fa0-60f2-11d2-afa6-00aa0024d8b6}';
- {$EXTERNALSYM GUID_DMUS_PROP_WriteLatency}
- (* Property Get/Set GUID_DMUS_PROP_WritePeriod
- *
- * Item 0: Synth buffer write period, in milliseconds
- * Get/Set SynthSink buffer write period, time span between successive writes.
- *)
- GUID_DMUS_PROP_WritePeriod: TGUID = '{268a0fa1-60f2-11d2-afa6-00aa0024d8b6}';
- {$EXTERNALSYM GUID_DMUS_PROP_WritePeriod}
- (* Property Get GUID_DMUS_PROP_MemorySize