/common/dx9/include/dmusici.h
C Header | 1883 lines | 1397 code | 198 blank | 288 comment | 0 complexity | b047a014fb70ce92d3cb2f6787283126 MD5 | raw file
Large files files are truncated, but you can click here to view the full file
- /************************************************************************
- * *
- * dmusici.h -- This module contains the API for the *
- * DirectMusic performance layer *
- * *
- * Copyright (c) Microsoft Corporation. All rights reserved. *
- * *
- ************************************************************************/
-
- #ifndef _DMUSICI_
- #define _DMUSICI_
-
- #include <windows.h>
-
- #define COM_NO_WINDOWS_H
- #include <objbase.h>
-
- #include <mmsystem.h>
- #include <dmusicc.h>
- /* plugin (track and tool) interfaces. This #include will eventually go away. */
- #include <dmplugin.h>
-
- #include <pshpack8.h>
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- typedef WORD TRANSITION_TYPE;
- typedef __int64 REFERENCE_TIME;
- typedef long MUSIC_TIME;
-
- #define MT_MIN 0x80000000 /* Minimum music time value. */
- #define MT_MAX 0x7FFFFFFF /* Maximum music time value. */
-
- #define DMUS_PPQ 768 /* parts per quarter note */
-
- interface IDirectMusicTrack;
- interface IDirectMusicPerformance;
- interface IDirectMusicPerformance8;
- interface IDirectMusicTool;
- interface IDirectMusicSegment;
- interface IDirectMusicSegment8;
- interface IDirectMusicSegmentState;
- interface IDirectMusicSegmentState8;
- interface IDirectMusicGraph;
- interface IDirectMusicBuffer;
- interface IDirectMusicInstrument;
- interface IDirectMusicDownloadedInstrument;
- interface IDirectMusicBand;
- interface IDirectMusicChordMap;
- interface IDirectMusicLoader;
- interface IDirectMusicLoader8;
- interface IDirectMusicScript;
- interface IDirectMusicObject;
- interface IDirectMusicStyle8;
- interface IDirectMusicPatternTrack;
- interface IDirectMusicContainer;
- interface IDirectMusicTool8;
- interface IDirectMusicTrack8;
- interface IDirectMusicAudioPath;
- #ifndef __cplusplus
- typedef interface IDirectMusicTrack IDirectMusicTrack;
- typedef interface IDirectMusicPerformance IDirectMusicPerformance;
- typedef interface IDirectMusicPerformance8 IDirectMusicPerformance8;
- typedef interface IDirectMusicTool IDirectMusicTool;
- typedef interface IDirectMusicSegment IDirectMusicSegment;
- typedef interface IDirectMusicSegment8 IDirectMusicSegment8;
- typedef interface IDirectMusicSegmentState IDirectMusicSegmentState;
- typedef interface IDirectMusicSegmentState8 IDirectMusicSegmentState8;
- typedef interface IDirectMusicGraph IDirectMusicGraph;
- typedef interface IDirectMusicBuffer IDirectMusicBuffer;
- typedef interface IDirectMusicInstrument IDirectMusicInstrument;
- typedef interface IDirectMusicDownloadedInstrument IDirectMusicDownloadedInstrument;
- typedef interface IDirectMusicBand IDirectMusicBand;
- typedef interface IDirectMusicChordMap IDirectMusicChordMap;
- typedef interface IDirectMusicObject IDirectMusicObject;
- typedef interface IDirectMusicLoader IDirectMusicLoader;
- typedef interface IDirectMusicLoader8 IDirectMusicLoader8;
- typedef interface IDirectMusicScript IDirectMusicScript;
- typedef interface IDirectMusicStyle8 IDirectMusicStyle8;
- typedef interface IDirectMusicPatternTrack IDirectMusicPatternTrack;
- typedef interface IDirectMusicContainer IDirectMusicContainer;
- typedef interface IDirectMusicTool8 IDirectMusicTool8;
- typedef interface IDirectMusicTrack8 IDirectMusicTrack8;
- typedef interface IDirectMusicAudioPath IDirectMusicAudioPath;
- #endif
-
- typedef enum enumDMUS_STYLET_TYPES
- {
- DMUS_STYLET_PATTERN = 0,
- DMUS_STYLET_MOTIF = 1,
- } DMUS_STYLET_TYPES;
-
-
- typedef enum enumDMUS_COMMANDT_TYPES
- {
- DMUS_COMMANDT_GROOVE = 0,
- DMUS_COMMANDT_FILL = 1,
- DMUS_COMMANDT_INTRO = 2,
- DMUS_COMMANDT_BREAK = 3,
- DMUS_COMMANDT_END = 4,
- DMUS_COMMANDT_ENDANDINTRO = 5
- } DMUS_COMMANDT_TYPES;
-
- typedef enum enumDMUS_SHAPET_TYPES
- {
- DMUS_SHAPET_FALLING = 0,
- DMUS_SHAPET_LEVEL = 1,
- DMUS_SHAPET_LOOPABLE = 2,
- DMUS_SHAPET_LOUD = 3,
- DMUS_SHAPET_QUIET = 4,
- DMUS_SHAPET_PEAKING = 5,
- DMUS_SHAPET_RANDOM = 6,
- DMUS_SHAPET_RISING = 7,
- DMUS_SHAPET_SONG = 8
- } DMUS_SHAPET_TYPES;
-
- typedef enum enumDMUS_COMPOSEF_FLAGS
- {
- DMUS_COMPOSEF_NONE = 0,
- DMUS_COMPOSEF_ALIGN = 0x1,
- DMUS_COMPOSEF_OVERLAP = 0x2,
- DMUS_COMPOSEF_IMMEDIATE = 0x4,
- DMUS_COMPOSEF_GRID = 0x8,
- DMUS_COMPOSEF_BEAT = 0x10,
- DMUS_COMPOSEF_MEASURE = 0x20,
- DMUS_COMPOSEF_AFTERPREPARETIME = 0x40,
- DMUS_COMPOSEF_VALID_START_BEAT = 0x80, /* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur on any beat. */
- DMUS_COMPOSEF_VALID_START_GRID = 0x100, /* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur on any grid. */
- DMUS_COMPOSEF_VALID_START_TICK = 0x200, /* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur any time. */
- DMUS_COMPOSEF_SEGMENTEND = 0x400, /* Play the transition at the end of the current segment. */
- DMUS_COMPOSEF_MARKER = 0x800, /* Play the transition at the next marker in the current segment. */
- DMUS_COMPOSEF_MODULATE = 0x1000,
- DMUS_COMPOSEF_LONG = 0x2000,
- DMUS_COMPOSEF_ENTIRE_TRANSITION = 0x4000, /* play the entire transition pattern */
- DMUS_COMPOSEF_1BAR_TRANSITION = 0x8000, /* play one bar of the transition pattern */
- DMUS_COMPOSEF_ENTIRE_ADDITION = 0x10000, /* play the additional pattern in its entirety */
- DMUS_COMPOSEF_1BAR_ADDITION = 0x20000, /* play one bar of the additional pattern */
- DMUS_COMPOSEF_VALID_START_MEASURE = 0x40000, /* In conjunction with DMUS_COMPOSEF_ALIGN, allows the switch to occur on any bar. */
- DMUS_COMPOSEF_DEFAULT = 0x80000, /* Use segment's default boundary */
- DMUS_COMPOSEF_NOINVALIDATE = 0x100000, /* Play without invalidating the currently playing segment(s) */
- DMUS_COMPOSEF_USE_AUDIOPATH = 0x200000, /* Uses the audio paths that are embedded in the segments */
- DMUS_COMPOSEF_INVALIDATE_PRI = 0x400000 /* Invalidate only the current primary seg state */
- } DMUS_COMPOSEF_FLAGS;
-
- #define DMUS_PMSG_PART \
- DWORD dwSize; \
- REFERENCE_TIME rtTime; /* real time (in 100 nanosecond increments) */ \
- MUSIC_TIME mtTime; /* music time */ \
- DWORD dwFlags; /* various bits (see DMUS_PMSGF_FLAGS enumeration) */ \
- DWORD dwPChannel; /* Performance Channel. The Performance can */ \
- /* use this to determine the port/channel. */ \
- DWORD dwVirtualTrackID; /* virtual track ID */ \
- IDirectMusicTool* pTool; /* tool interface pointer */ \
- IDirectMusicGraph* pGraph; /* tool graph interface pointer */ \
- DWORD dwType; /* PMSG type (see DMUS_PMSGT_TYPES defines) */ \
- DWORD dwVoiceID; /* unique voice id which allows synthesizers to */ \
- /* identify a specific event. For DirectX 6.0, */ \
- /* this field should always be 0. */ \
- DWORD dwGroupID; /* Track group id */ \
- IUnknown* punkUser; /* user com pointer, auto released upon PMSG free */
-
- /* every DMUS_PMSG is based off of this structure. The Performance needs
- to access these members consistently in every PMSG that goes through it. */
- typedef struct _DMUS_PMSG
- {
- /* begin DMUS_PMSG_PART */
- DMUS_PMSG_PART
- /* end DMUS_PMSG_PART */
-
- } DMUS_PMSG;
-
- #define DMUS_PCHANNEL_BROADCAST_PERFORMANCE 0xFFFFFFFF /* PMsg is sent on all PChannels of the performance. */
- #define DMUS_PCHANNEL_BROADCAST_AUDIOPATH 0xFFFFFFFE /* PMsg is sent on all PChannels of the audio path. */
- #define DMUS_PCHANNEL_BROADCAST_SEGMENT 0xFFFFFFFD /* PMsg is sent on all PChannels of the segment. */
- #define DMUS_PCHANNEL_BROADCAST_GROUPS 0xFFFFFFFC /* A duplicate PMsg is for each Channels Groups in the performance. */
-
- /* The DMUS_PATH constants are used in conjunction with GetObjectInPath to find a requested
- interface at a particular stage in the audio path.
- */
- #define DMUS_PATH_SEGMENT 0x1000 /* Get the segment itself (from a segment state.) */
- #define DMUS_PATH_SEGMENT_TRACK 0x1100 /* Look in Track List of Segment. */
- #define DMUS_PATH_SEGMENT_GRAPH 0x1200 /* Get the segment's tool graph. */
- #define DMUS_PATH_SEGMENT_TOOL 0x1300 /* Look in Tool Graph of Segment. */
- #define DMUS_PATH_AUDIOPATH 0x2000 /* Get the audiopath itself (from a segment state.) */
- #define DMUS_PATH_AUDIOPATH_GRAPH 0x2200 /* Get the audiopath's tool graph. */
- #define DMUS_PATH_AUDIOPATH_TOOL 0x2300 /* Look in Tool Graph of Audio Path. */
- #define DMUS_PATH_PERFORMANCE 0x3000 /* Access the performance. */
- #define DMUS_PATH_PERFORMANCE_GRAPH 0x3200 /* Get the performance's tool graph. */
- #define DMUS_PATH_PERFORMANCE_TOOL 0x3300 /* Look in Tool Graph of Performance. */
- #define DMUS_PATH_PORT 0x4000 /* Access the synth. */
- #define DMUS_PATH_BUFFER 0x6000 /* Look in DirectSoundBuffer. */
- #define DMUS_PATH_BUFFER_DMO 0x6100 /* Access a DMO in the buffer. */
- #define DMUS_PATH_MIXIN_BUFFER 0x7000 /* Look in a global mixin buffer. */
- #define DMUS_PATH_MIXIN_BUFFER_DMO 0x7100 /* Access a DMO in a global mixin buffer. */
- #define DMUS_PATH_PRIMARY_BUFFER 0x8000 /* Access the primary buffer. */
-
- /* To ignore PChannels when calling GetObjectInPath(), use the DMUS_PCHANNEL_ALL constant. */
- #define DMUS_PCHANNEL_ALL 0xFFFFFFFB
-
- /* The DMUS_APATH types are used in conjunction with CreateStandardAudioPath to
- build default path types. _SHARED_ means the same buffer is shared across multiple
- instantiations of the audiopath type. _DYNAMIC_ means a unique buffer is created
- every time.
- */
-
- #define DMUS_APATH_SHARED_STEREOPLUSREVERB 1 /* A standard music set up with stereo outs and reverb. */
- #define DMUS_APATH_DYNAMIC_3D 6 /* An audio path with one dynamic bus from the synth feeding to a dynamic 3d buffer. Does not send to env reverb. */
- #define DMUS_APATH_DYNAMIC_MONO 7 /* An audio path with one dynamic bus from the synth feeding to a dynamic mono buffer. */
- #define DMUS_APATH_DYNAMIC_STEREO 8 /* An audio path with two dynamic buses from the synth feeding to a dynamic stereo buffer. */
-
- typedef struct _DMUS_AUDIOPARAMS
- {
- DWORD dwSize; /* Size of this structure. */
- BOOL fInitNow; /* If true, the sink and synth are created immediately and results returned in this structure. */
- DWORD dwValidData; /* Flags indicating which fields below are valid. */
- DWORD dwFeatures; /* Required DMUS_AUDIOF features. */
- DWORD dwVoices; /* Required number of voices. */
- DWORD dwSampleRate; /* Sample rate of synths and sink. */
- CLSID clsidDefaultSynth; /* Class ID of default synthesizer. */
- } DMUS_AUDIOPARAMS;
-
- /* dwFeatures flags. These indicate which features are required for the audio environment. */
- #define DMUS_AUDIOF_3D 0x1 /* Require 3D buffers. */
- #define DMUS_AUDIOF_ENVIRON 0x2 /* Require environmental modeling. */
- #define DMUS_AUDIOF_EAX 0x4 /* Require use of EAX effects. */
- #define DMUS_AUDIOF_DMOS 0x8 /* Require use of additional DMOs. */
- #define DMUS_AUDIOF_STREAMING 0x10 /* Require support for streaming waves. */
- #define DMUS_AUDIOF_BUFFERS 0x20 /* Require support for multiple buffers (all above cases need this.) */
- #define DMUS_AUDIOF_ALL 0x3F /* Requires everything. */
-
- /* dwValidData flags. These indicate which fields in DMUS_AUDIOPARAMS have been filled in. If fInitNow is set, these also return what was allocated. */
- #define DMUS_AUDIOPARAMS_FEATURES 0x00000001
- #define DMUS_AUDIOPARAMS_VOICES 0x00000002
- #define DMUS_AUDIOPARAMS_SAMPLERATE 0x00000004
- #define DMUS_AUDIOPARAMS_DEFAULTSYNTH 0x00000008
-
- /* DMUS_PMSGF_FLAGS fill the DMUS_PMSG's dwFlags member */
- typedef enum enumDMUS_PMSGF_FLAGS
- {
- DMUS_PMSGF_REFTIME = 1, /* if rtTime is valid */
- DMUS_PMSGF_MUSICTIME = 2, /* if mtTime is valid */
- DMUS_PMSGF_TOOL_IMMEDIATE = 4, /* if PMSG should be processed immediately */
- DMUS_PMSGF_TOOL_QUEUE = 8, /* if PMSG should be processed a little early, at Queue time */
- DMUS_PMSGF_TOOL_ATTIME = 0x10, /* if PMSG should be processed at the time stamp */
- DMUS_PMSGF_TOOL_FLUSH = 0x20, /* if PMSG is being flushed */
- DMUS_PMSGF_LOCKTOREFTIME = 0x40, /* if rtTime can not be overriden by a tempo change. */
- DMUS_PMSGF_DX8 = 0x80 /* if the message has DX8 or later extensions. */
- /* The values of DMUS_TIME_RESOLVE_FLAGS may also be used inside the */
- /* DMUS_PMSG's dwFlags member. */
- } DMUS_PMSGF_FLAGS;
-
- /* DMUS_PMSGT_TYPES fill the DMUS_PMSG's dwType member */
- typedef enum enumDMUS_PMSGT_TYPES
- {
- DMUS_PMSGT_MIDI = 0, /* MIDI short message */
- DMUS_PMSGT_NOTE = 1, /* Interactive Music Note */
- DMUS_PMSGT_SYSEX = 2, /* MIDI long message (system exclusive message) */
- DMUS_PMSGT_NOTIFICATION = 3, /* Notification message */
- DMUS_PMSGT_TEMPO = 4, /* Tempo message */
- DMUS_PMSGT_CURVE = 5, /* Control change / pitch bend, etc. curve */
- DMUS_PMSGT_TIMESIG = 6, /* Time signature */
- DMUS_PMSGT_PATCH = 7, /* Patch changes */
- DMUS_PMSGT_TRANSPOSE = 8, /* Transposition messages */
- DMUS_PMSGT_CHANNEL_PRIORITY = 9, /* Channel priority */
- DMUS_PMSGT_STOP = 10, /* Stop message */
- DMUS_PMSGT_DIRTY = 11, /* Tells Tools that cache GetParam() info to refresh */
- DMUS_PMSGT_WAVE = 12, /* Carries control information for playing a wave. */
- DMUS_PMSGT_LYRIC = 13, /* Lyric message from lyric track. */
- DMUS_PMSGT_SCRIPTLYRIC = 14, /* Lyric message sent by a script with the Trace function. */
- DMUS_PMSGT_USER = 255 /* User message */
- } DMUS_PMSGT_TYPES;
-
- /* DMUS_SEGF_FLAGS correspond to IDirectMusicPerformance::PlaySegment, and other API */
- typedef enum enumDMUS_SEGF_FLAGS
- {
- DMUS_SEGF_REFTIME = 1<<6, /* 0x40 Time parameter is in reference time */
- DMUS_SEGF_SECONDARY = 1<<7, /* 0x80 Secondary segment */
- DMUS_SEGF_QUEUE = 1<<8, /* 0x100 Queue at the end of the primary segment queue (primary only) */
- DMUS_SEGF_CONTROL = 1<<9, /* 0x200 Play as a control track (secondary segments only) */
- DMUS_SEGF_AFTERPREPARETIME = 1<<10, /* 0x400 Play after the prepare time (See IDirectMusicPerformance::GetPrepareTime) */
- DMUS_SEGF_GRID = 1<<11, /* 0x800 Play on grid boundary */
- DMUS_SEGF_BEAT = 1<<12, /* 0x1000 Play on beat boundary */
- DMUS_SEGF_MEASURE = 1<<13, /* 0x2000 Play on measure boundary */
- DMUS_SEGF_DEFAULT = 1<<14, /* 0x4000 Use segment's default boundary */
- DMUS_SEGF_NOINVALIDATE = 1<<15, /* 0x8000 Play without invalidating the currently playing segment(s) */
- DMUS_SEGF_ALIGN = 1<<16, /* 0x10000 Align segment with requested boundary, but switch at first valid point */
- DMUS_SEGF_VALID_START_BEAT = 1<<17, /* 0x20000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur on any beat. */
- DMUS_SEGF_VALID_START_GRID = 1<<18, /* 0x40000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur on any grid. */
- DMUS_SEGF_VALID_START_TICK = 1<<19, /* 0x80000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur any time. */
- DMUS_SEGF_AUTOTRANSITION = 1<<20, /* 0x100000 Compose and play a transition segment, using the transition template. */
- DMUS_SEGF_AFTERQUEUETIME = 1<<21, /* 0x200000 Make sure to play after the queue time. This is default for primary segments */
- DMUS_SEGF_AFTERLATENCYTIME = 1<<22, /* 0x400000 Make sure to play after the latency time. This is true for all segments, so this is a nop */
- DMUS_SEGF_SEGMENTEND = 1<<23, /* 0x800000 Play at the next end of segment. */
- DMUS_SEGF_MARKER = 1<<24, /* 0x1000000 Play at next marker in the primary segment. If there are no markers, default to any other resolution requests. */
- DMUS_SEGF_TIMESIG_ALWAYS = 1<<25, /* 0x2000000 Even if there is no primary segment, align start time with current time signature. */
- DMUS_SEGF_USE_AUDIOPATH = 1<<26, /* 0x4000000 Uses the audio path that is embedded in the segment. */
- DMUS_SEGF_VALID_START_MEASURE = 1<<27, /* 0x8000000 In conjunction with DMUS_SEGF_ALIGN, allows the switch to occur on any bar. */
- DMUS_SEGF_INVALIDATE_PRI = 1<<28 /* 0x10000000 invalidate only the current primary seg state */
- } DMUS_SEGF_FLAGS;
-
- #define DMUS_SEG_REPEAT_INFINITE 0xFFFFFFFF /* For IDirectMusicSegment::SetRepeat*/
- #define DMUS_SEG_ALLTRACKS 0x80000000 /* For IDirectMusicSegment::SetParam() and SetTrackConfig() - selects all tracks instead on nth index. */
- #define DMUS_SEG_ANYTRACK 0x80000000 /* For IDirectMusicSegment::GetParam() - checks each track until it finds one that returns data (not DMUS_E_NOT_FOUND.) */
-
-
- /* DMUS_TIME_RESOLVE_FLAGS correspond to IDirectMusicPerformance::GetResolvedTime, and can */
- /* also be used interchangeably with the corresponding DMUS_SEGF_FLAGS, since their values */
- /* are intentionally the same */
- typedef enum enumDMUS_TIME_RESOLVE_FLAGS
- {
- DMUS_TIME_RESOLVE_AFTERPREPARETIME = DMUS_SEGF_AFTERPREPARETIME,
- DMUS_TIME_RESOLVE_AFTERQUEUETIME = DMUS_SEGF_AFTERQUEUETIME,
- DMUS_TIME_RESOLVE_AFTERLATENCYTIME = DMUS_SEGF_AFTERLATENCYTIME,
- DMUS_TIME_RESOLVE_GRID = DMUS_SEGF_GRID,
- DMUS_TIME_RESOLVE_BEAT = DMUS_SEGF_BEAT,
- DMUS_TIME_RESOLVE_MEASURE = DMUS_SEGF_MEASURE,
- DMUS_TIME_RESOLVE_MARKER = DMUS_SEGF_MARKER,
- DMUS_TIME_RESOLVE_SEGMENTEND = DMUS_SEGF_SEGMENTEND,
- } DMUS_TIME_RESOLVE_FLAGS;
-
- /* The following flags are sent inside the DMUS_CHORD_KEY.dwFlags parameter */
- typedef enum enumDMUS_CHORDKEYF_FLAGS
- {
- DMUS_CHORDKEYF_SILENT = 1, /* is the chord silent? */
- } DMUS_CHORDKEYF_FLAGS;
-
- #define DMUS_MAXSUBCHORD 8
-
- typedef struct _DMUS_SUBCHORD
- {
- DWORD dwChordPattern; /* Notes in the subchord */
- DWORD dwScalePattern; /* Notes in the scale */
- DWORD dwInversionPoints; /* Where inversions can occur */
- DWORD dwLevels; /* Which levels are supported by this subchord */
- BYTE bChordRoot; /* Root of the subchord */
- BYTE bScaleRoot; /* Root of the scale */
- } DMUS_SUBCHORD;
-
- typedef struct _DMUS_CHORD_KEY
- {
- WCHAR wszName[16]; /* Name of the chord */
- WORD wMeasure; /* Measure this falls on */
- BYTE bBeat; /* Beat this falls on */
- BYTE bSubChordCount; /* Number of chords in the list of subchords */
- DMUS_SUBCHORD SubChordList[DMUS_MAXSUBCHORD]; /* List of sub chords */
- DWORD dwScale; /* Scale underlying the entire chord */
- BYTE bKey; /* Key underlying the entire chord */
- BYTE bFlags; /* Miscelaneous flags */
- } DMUS_CHORD_KEY;
-
- /* DMUS_NOTE_PMSG */
- typedef struct _DMUS_NOTE_PMSG
- {
- /* begin DMUS_PMSG_PART */
- DMUS_PMSG_PART
- /* end DMUS_PMSG_PART */
-
- MUSIC_TIME mtDuration; /* duration */
- WORD wMusicValue; /* Description of note in chord and key. */
- WORD wMeasure; /* Measure in which this note occurs */
- short nOffset; /* Offset from grid at which this note occurs */
- BYTE bBeat; /* Beat (in measure) at which this note occurs */
- BYTE bGrid; /* Grid offset from beat at which this note occurs */
- BYTE bVelocity; /* Note velocity */
- BYTE bFlags; /* see DMUS_NOTEF_FLAGS */
- BYTE bTimeRange; /* Range to randomize time. */
- BYTE bDurRange; /* Range to randomize duration. */
- BYTE bVelRange; /* Range to randomize velocity. */
- BYTE bPlayModeFlags; /* Play mode */
- BYTE bSubChordLevel; /* Which subchord level this note uses. */
- BYTE bMidiValue; /* The MIDI note value, converted from wMusicValue */
- char cTranspose; /* Transposition to add to midi note value after converted from wMusicValue. */
- } DMUS_NOTE_PMSG;
-
- typedef enum enumDMUS_NOTEF_FLAGS
- {
- DMUS_NOTEF_NOTEON = 1, /* Set if this is a MIDI Note On. Otherwise, it is MIDI Note Off */
- /* DX8 flags: */
- DMUS_NOTEF_NOINVALIDATE = 2, /* Don't invalidate this note off. */
- DMUS_NOTEF_NOINVALIDATE_INSCALE = 4,/* Don't invalidate if still within the scale. */
- DMUS_NOTEF_NOINVALIDATE_INCHORD = 8,/* Don't invalidate if still within the chord. */
- DMUS_NOTEF_REGENERATE = 0x10, /* Regenerate the note on an invalidate. */
- } DMUS_NOTEF_FLAGS;
-
- /* The DMUS_PLAYMODE_FLAGS are used to determine how to convert wMusicValue
- into the appropriate bMidiValue.
- */
-
- typedef enum enumDMUS_PLAYMODE_FLAGS
- {
- DMUS_PLAYMODE_KEY_ROOT = 1, /* Transpose on top of the key root. */
- DMUS_PLAYMODE_CHORD_ROOT = 2, /* Transpose on top of the chord root. */
- DMUS_PLAYMODE_SCALE_INTERVALS = 4, /* Use scale intervals from scale pattern. */
- DMUS_PLAYMODE_CHORD_INTERVALS = 8, /* Use chord intervals from chord pattern. */
- DMUS_PLAYMODE_NONE = 16, /* No mode. Indicates the parent part's mode should be used. */
- } DMUS_PLAYMODE_FLAGS;
-
- /* The following are playback modes that can be created by combining the DMUS_PLAYMODE_FLAGS
- in various ways:
- */
-
- /* Fixed. wMusicValue holds final MIDI note value. This is used for drums, sound effects, and sequenced
- notes that should not be transposed by the chord or scale.
- */
- #define DMUS_PLAYMODE_FIXED 0
- /* In fixed to key, the musicvalue is again a fixed MIDI value, but it
- is transposed on top of the key root.
- */
- #define DMUS_PLAYMODE_FIXEDTOKEY DMUS_PLAYMODE_KEY_ROOT
- /* In fixed to chord, the musicvalue is also a fixed MIDI value, but it
- is transposed on top of the chord root.
- */
- #define DMUS_PLAYMODE_FIXEDTOCHORD DMUS_PLAYMODE_CHORD_ROOT
- /* In Pedalpoint, the key root is used and the notes only track the intervals in
- the scale. The chord root and intervals are completely ignored. This is useful
- for melodic lines that play relative to the key root.
- */
- #define DMUS_PLAYMODE_PEDALPOINT (DMUS_PLAYMODE_KEY_ROOT | DMUS_PLAYMODE_SCALE_INTERVALS)
- /* In the Melodic mode, the chord root is used but the notes only track the intervals in
- the scale. The key root and chord intervals are completely ignored. This is useful
- for melodic lines that play relative to the chord root.
- */
- #define DMUS_PLAYMODE_MELODIC (DMUS_PLAYMODE_CHORD_ROOT | DMUS_PLAYMODE_SCALE_INTERVALS)
- /* Normal chord mode is the prevalent playback mode.
- The notes track the intervals in the chord, which is based on the chord root.
- If there is a scale component to the MusicValue, the additional intervals
- are pulled from the scale and added.
- If the chord does not have an interval to match the chord component of
- the MusicValue, the note is silent.
- */
- #define DMUS_PLAYMODE_NORMALCHORD (DMUS_PLAYMODE_CHORD_ROOT | DMUS_PLAYMODE_CHORD_INTERVALS)
- /* If it is desirable to play a note that is above the top of the chord, the
- always play mode (known as "purpleized" in a former life) finds a position
- for the note by using intervals from the scale. Essentially, this mode is
- a combination of the Normal and Melodic playback modes, where a failure
- in Normal causes a second try in Melodic mode.
- */
- #define DMUS_PLAYMODE_ALWAYSPLAY (DMUS_PLAYMODE_MELODIC | DMUS_PLAYMODE_NORMALCHORD)
-
- /* These playmodes are new for dx8. */
- /* In PedalpointChord, the key root is used and the notes only track the intervals in
- the chord. The chord root and scale intervals are completely ignored. This is useful
- for chordal lines that play relative to the key root.
- */
- #define DMUS_PLAYMODE_PEDALPOINTCHORD (DMUS_PLAYMODE_KEY_ROOT | DMUS_PLAYMODE_CHORD_INTERVALS)
-
- /* For completeness, here's a mode that tries for pedalpointchord, but if it fails
- uses scale intervals
- */
- #define DMUS_PLAYMODE_PEDALPOINTALWAYS (DMUS_PLAYMODE_PEDALPOINT | DMUS_PLAYMODE_PEDALPOINTCHORD)
-
-
- /* Legacy names for modes... */
- #define DMUS_PLAYMODE_PURPLEIZED DMUS_PLAYMODE_ALWAYSPLAY
- #define DMUS_PLAYMODE_SCALE_ROOT DMUS_PLAYMODE_KEY_ROOT
- #define DMUS_PLAYMODE_FIXEDTOSCALE DMUS_PLAYMODE_FIXEDTOKEY
-
-
- /* DMUS_MIDI_PMSG */
- typedef struct _DMUS_MIDI_PMSG
- {
- /* begin DMUS_PMSG_PART */
- DMUS_PMSG_PART
- /* end DMUS_PMSG_PART */
-
- BYTE bStatus;
- BYTE bByte1;
- BYTE bByte2;
- BYTE bPad[1];
- } DMUS_MIDI_PMSG;
-
- /* DMUS_PATCH_PMSG */
- typedef struct _DMUS_PATCH_PMSG
- {
- /* begin DMUS_PMSG_PART */
- DMUS_PMSG_PART
- /* end DMUS_PMSG_PART */
-
- BYTE byInstrument;
- BYTE byMSB;
- BYTE byLSB;
- BYTE byPad[1];
- } DMUS_PATCH_PMSG;
-
- /* DMUS_TRANSPOSE_PMSG */
- typedef struct _DMUS_TRANSPOSE_PMSG
- {
- /* begin DMUS_PMSG_PART */
- DMUS_PMSG_PART
- /* end DMUS_PMSG_PART */
-
- short nTranspose;
- /* Following exists only under DX8 and on (check dwFlags for DMUS_PMSGF_DX8) */
- WORD wMergeIndex; /* Allows multiple parameters to be merged (pitchbend, volume, and expression.)*/
- } DMUS_TRANSPOSE_PMSG;
-
- /* DMUS_CHANNEL_PRIORITY_PMSG */
- typedef struct _DMUS_CHANNEL_PRIORITY_PMSG
- {
- /* begin DMUS_PMSG_PART */
- DMUS_PMSG_PART
- /* end DMUS_PMSG_PART */
-
- DWORD dwChannelPriority;
- } DMUS_CHANNEL_PRIORITY_PMSG;
-
- /* DMUS_TEMPO_PMSG */
- typedef struct _DMUS_TEMPO_PMSG
- {
- /* begin DMUS_PMSG_PART */
- DMUS_PMSG_PART
- /* end DMUS_PMSG_PART */
-
- double dblTempo; /* the tempo */
- } DMUS_TEMPO_PMSG;
-
- #define DMUS_TEMPO_MAX 1000
- #define DMUS_TEMPO_MIN 1
-
- #define DMUS_MASTERTEMPO_MAX 100.0f
- #define DMUS_MASTERTEMPO_MIN 0.01f
-
- /* DMUS_SYSEX_PMSG */
- typedef struct _DMUS_SYSEX_PMSG
- {
- /* begin DMUS_PMSG_PART */
- DMUS_PMSG_PART
- /* end DMUS_PMSG_PART */
-
- DWORD dwLen; /* length of the data */
- BYTE abData[1]; /* array of data, length equal to dwLen */
- } DMUS_SYSEX_PMSG;
-
- /* DMUS_CURVE_PMSG */
- typedef struct _DMUS_CURVE_PMSG
- {
- /* begin DMUS_PMSG_PART */
- DMUS_PMSG_PART
- /* end DMUS_PMSG_PART */
-
- MUSIC_TIME mtDuration; /* how long this curve lasts */
- MUSIC_TIME mtOriginalStart; /* must be set to either zero when this PMSG is created or to the original mtTime of the curve */
- MUSIC_TIME mtResetDuration; /* how long after the curve is finished to allow a flush or
- invalidation to reset to the reset value, nResetValue */
- short nStartValue; /* curve's start value */
- short nEndValue; /* curve's end value */
- short nResetValue; /* curve's reset value, set when a flush or invalidation
- occurs within mtDuration + mtResetDuration */
- WORD wMeasure; /* Measure in which this curve occurs */
- short nOffset; /* Offset from grid at which this curve occurs */
- BYTE bBeat; /* Beat (in measure) at which this curve occurs */
- BYTE bGrid; /* Grid offset from beat at which this curve occurs */
- BYTE bType; /* type of curve */
- BYTE bCurveShape; /* shape of curve */
- BYTE bCCData; /* CC# if this is a control change type */
- BYTE bFlags; /* Curve reset and start from current value flags. */
- /* Following exists only under DX8 and on (check dwFlags for DMUS_PMSGF_DX8) */
- WORD wParamType; /* RPN or NRPN parameter number. */
- WORD wMergeIndex; /* Allows multiple parameters to be merged (pitchbend, volume, and expression.)*/
- } DMUS_CURVE_PMSG;
-
- typedef enum enumDMUS_CURVE_FLAGS
- {
- DMUS_CURVE_RESET = 1, /* When set, the nResetValue must be sent when the
- time is reached or an invalidate occurs because
- of a transition. If not set, the curve stays
- permanently stuck at the new value. */
- DMUS_CURVE_START_FROM_CURRENT = 2/* Ignore Start, start the curve at the current value.
- This only works for volume, expression, and pitchbend. */
- } DMUS_CURVE_FLAGS;
-
-
- #define DMUS_CURVE_RESET 1
-
- /* Curve shapes */
- enum
- {
- DMUS_CURVES_LINEAR = 0,
- DMUS_CURVES_INSTANT = 1,
- DMUS_CURVES_EXP = 2,
- DMUS_CURVES_LOG = 3,
- DMUS_CURVES_SINE = 4
- };
- /* curve types */
- #define DMUS_CURVET_PBCURVE 0x03 /* Pitch bend curve. */
- #define DMUS_CURVET_CCCURVE 0x04 /* Control change curve. */
- #define DMUS_CURVET_MATCURVE 0x05 /* Mono aftertouch curve. */
- #define DMUS_CURVET_PATCURVE 0x06 /* Poly aftertouch curve. */
- #define DMUS_CURVET_RPNCURVE 0x07 /* RPN curve with curve type in wParamType. */
- #define DMUS_CURVET_NRPNCURVE 0x08 /* NRPN curve with curve type in wParamType. */
-
- /* DMUS_TIMESIG_PMSG */
- typedef struct _DMUS_TIMESIG_PMSG
- {
- /* begin DMUS_PMSG_PART */
- DMUS_PMSG_PART
- /* end DMUS_PMSG_PART */
-
- /* Time signatures define how many beats per measure, which note receives */
- /* the beat, and the grid resolution. */
- BYTE bBeatsPerMeasure; /* beats per measure (top of time sig) */
- BYTE bBeat; /* what note receives the beat (bottom of time sig.) */
- /* we can assume that 0 means 256th note */
- WORD wGridsPerBeat; /* grids per beat */
- } DMUS_TIMESIG_PMSG;
-
-
-
- /* notification type values */
- /* The following correspond to GUID_NOTIFICATION_SEGMENT */
- #define DMUS_NOTIFICATION_SEGSTART 0
- #define DMUS_NOTIFICATION_SEGEND 1
- #define DMUS_NOTIFICATION_SEGALMOSTEND 2
- #define DMUS_NOTIFICATION_SEGLOOP 3
- #define DMUS_NOTIFICATION_SEGABORT 4
- /* The following correspond to GUID_NOTIFICATION_PERFORMANCE */
- #define DMUS_NOTIFICATION_MUSICSTARTED 0
- #define DMUS_NOTIFICATION_MUSICSTOPPED 1
- #define DMUS_NOTIFICATION_MUSICALMOSTEND 2
- /* The following corresponds to GUID_NOTIFICATION_MEASUREANDBEAT */
- #define DMUS_NOTIFICATION_MEASUREBEAT 0
- /* The following corresponds to GUID_NOTIFICATION_CHORD */
- #define DMUS_NOTIFICATION_CHORD 0
- /* The following correspond to GUID_NOTIFICATION_COMMAND */
- #define DMUS_NOTIFICATION_GROOVE 0
- #define DMUS_NOTIFICATION_EMBELLISHMENT 1
- /* The following corresponds to GUID_NOTIFICATION_RECOMPOSE */
- #define DMUS_NOTIFICATION_RECOMPOSE 0
-
- /* DMUS_NOTIFICATION_PMSG */
- typedef struct _DMUS_NOTIFICATION_PMSG
- {
- /* begin DMUS_PMSG_PART */
- DMUS_PMSG_PART
- /* end DMUS_PMSG_PART */
-
- GUID guidNotificationType;
- DWORD dwNotificationOption;
- DWORD dwField1;
- DWORD dwField2;
- } DMUS_NOTIFICATION_PMSG;
-
- /* DMUS_WAVE_PMSG */
- typedef struct _DMUS_WAVE_PMSG
- {
- /* begin DMUS_PMSG_PART */
- DMUS_PMSG_PART
- /* end DMUS_PMSG_PART */
-
- REFERENCE_TIME rtStartOffset; /* How far into the wave to start, in reference time units only. */
- REFERENCE_TIME rtDuration; /* Duration of the wave, in either reference time or music time. */
- long lOffset; /* Offset from actual time to logical time, in music or ref time. */
- long lVolume; /* Initial volume, in 100ths of a dB. */
- long lPitch; /* Initial pitch, in 100ths of a semitone. */
- BYTE bFlags; /* Flags, including DMUS_WAVEF_OFF... */
- } DMUS_WAVE_PMSG;
-
- #define DMUS_WAVEF_OFF 1 /* If wave is playing and this is the off message. */
- #define DMUS_WAVEF_STREAMING 2 /* If wave is streaming. */
- #define DMUS_WAVEF_NOINVALIDATE 4 /* Don't invalidate this wave. */
- #define DMUS_WAVEF_NOPREROLL 8 /* Don't preroll any wave data. */
- #define DMUS_WAVEF_IGNORELOOPS 0x20 /* Ignore segment looping. */
-
- /* DMUS_LYRIC_PMSG */
- typedef struct _DMUS_LYRIC_PMSG
- {
- /* begin DMUS_PMSG_PART */
- DMUS_PMSG_PART
- /* end DMUS_PMSG_PART */
-
- WCHAR wszString[1]; /* null-terminated Unicode lyric string (structure is actually larger than size 1) */
- } DMUS_LYRIC_PMSG;
-
- #define DMUS_MAX_NAME 64 /* Maximum object name length. */
- #define DMUS_MAX_CATEGORY 64 /* Maximum object category name length. */
- #define DMUS_MAX_FILENAME MAX_PATH
-
- typedef struct _DMUS_VERSION {
- DWORD dwVersionMS;
- DWORD dwVersionLS;
- }DMUS_VERSION, FAR *LPDMUS_VERSION;
-
- /* Time Signature structure, used by IDirectMusicStyle */
- /* Also used as a parameter for GetParam() and SetParam */
- typedef struct _DMUS_TIMESIGNATURE
- {
- MUSIC_TIME mtTime;
- BYTE bBeatsPerMeasure; /* beats per measure (top of time sig) */
- BYTE bBeat; /* what note receives the beat (bottom of time sig.) */
- /* we can assume that 0 means 256th note */
- WORD wGridsPerBeat; /* grids per beat */
- } DMUS_TIMESIGNATURE;
-
- typedef struct _DMUS_VALID_START_PARAM
- {
- MUSIC_TIME mtTime; /* Time of the first legal start
- point after (or including) the requested time.
- This is a returned value.
- Time format is the relative offset from requested time. */
- } DMUS_VALID_START_PARAM;
-
- typedef struct _DMUS_PLAY_MARKER_PARAM
- {
- MUSIC_TIME mtTime; /* Time of the first legal segment play
- marker before (or including) the requested time.
- This is a returned value.
- Time format is the relative offset from requested time. */
- } DMUS_PLAY_MARKER_PARAM;
-
- /* The DMUSOBJECTDESC structure is used to communicate everything you could */
- /* possibly use to describe a DirectMusic object. */
-
- typedef struct _DMUS_OBJECTDESC
- {
- DWORD dwSize; /* Size of this structure. */
- DWORD dwValidData; /* Flags indicating which fields below are valid. */
- GUID guidObject; /* Unique ID for this object. */
- GUID guidClass; /* GUID for the class of object. */
- FILETIME ftDate; /* Last edited date of object. */
- DMUS_VERSION vVersion; /* Version. */
- WCHAR wszName[DMUS_MAX_NAME]; /* Name of object. */
- WCHAR wszCategory[DMUS_MAX_CATEGORY]; /* Category for object (optional). */
- WCHAR wszFileName[DMUS_MAX_FILENAME]; /* File path. */
- LONGLONG llMemLength; /* Size of Memory data. */
- LPBYTE pbMemData; /* Memory pointer for data. */
- IStream * pStream; /* Stream with data. */
- } DMUS_OBJECTDESC;
-
- typedef DMUS_OBJECTDESC *LPDMUS_OBJECTDESC;
-
- /* Flags for dwValidData. When set, a flag indicates that the */
- /* corresponding field in DMUSOBJECTDESC holds valid data. */
-
- #define DMUS_OBJ_OBJECT (1 << 0) /* Object GUID is valid. */
- #define DMUS_OBJ_CLASS (1 << 1) /* Class GUID is valid. */
- #define DMUS_OBJ_NAME (1 << 2) /* Name is valid. */
- #define DMUS_OBJ_CATEGORY (1 << 3) /* Category is valid. */
- #define DMUS_OBJ_FILENAME (1 << 4) /* File path is valid. */
- #define DMUS_OBJ_FULLPATH (1 << 5) /* Path is full path. */
- #define DMUS_OBJ_URL (1 << 6) /* Path is URL. */
- #define DMUS_OBJ_VERSION (1 << 7) /* Version is valid. */
- #define DMUS_OBJ_DATE (1 << 8) /* Date is valid. */
- #define DMUS_OBJ_LOADED (1 << 9) /* Object is currently loaded in memory. */
- #define DMUS_OBJ_MEMORY (1 << 10) /* Object is pointed to by pbMemData. */
- #define DMUS_OBJ_STREAM (1 << 11) /* Object is stored in pStream. */
-
- /* The DMUS_SCRIPT_ERRORINFO structure describes an error that occurred in a script.
- It is returned by methods in IDirectMusicScript. */
- typedef struct _DMUS_SCRIPT_ERRORINFO
- {
- DWORD dwSize; /* Size of this structure. */
- HRESULT hr;
- ULONG ulLineNumber;
- LONG ichCharPosition;
- WCHAR wszSourceFile[DMUS_MAX_FILENAME];
- WCHAR wszSourceComponent[DMUS_MAX_FILENAME];
- WCHAR wszDescription[DMUS_MAX_FILENAME];
- WCHAR wszSourceLineText[DMUS_MAX_FILENAME];
- } DMUS_SCRIPT_ERRORINFO;
-
- /* Track configuration flags, used with IDirectMusicSegment8::SetTrackConfig() */
-
- #define DMUS_TRACKCONFIG_OVERRIDE_ALL 1 /* This track should get parameters from this segment before controlling and primary tracks. */
- #define DMUS_TRACKCONFIG_OVERRIDE_PRIMARY 2 /* This track should get parameters from this segment before the primary segment tracks. */
- #define DMUS_TRACKCONFIG_FALLBACK 4 /* This track should get parameters from this segment if the primary and controlling segments don't succeed. */
- #define DMUS_TRACKCONFIG_CONTROL_ENABLED 8 /* GetParam() enabled for this track. */
- #define DMUS_TRACKCONFIG_PLAY_ENABLED 0x10 /* Play() enabled for this track. */
- #define DMUS_TRACKCONFIG_NOTIFICATION_ENABLED 0x20 /* Notifications enabled for this track. */
- #define DMUS_TRACKCONFIG_PLAY_CLOCKTIME 0x40 /* This track plays in clock time, not music time. */
- #define DMUS_TRACKCONFIG_PLAY_COMPOSE 0x80 /* This track should regenerate data each time it starts playing. */
- #define DMUS_TRACKCONFIG_LOOP_COMPOSE 0x100 /* This track should regenerate data each time it repeats. */
- #define DMUS_TRACKCONFIG_COMPOSING 0x200 /* This track is used to compose other tracks. */
- #define DMUS_TRACKCONFIG_CONTROL_PLAY 0x10000 /* This track, when played in a controlling segment, overrides playback of primary segment tracks. */
- #define DMUS_TRACKCONFIG_CONTROL_NOTIFICATION 0x20000 /* This track, when played in a controlling segment, overrides notification of primary segment tracks. */
- /* Additional track config flags for composing transitions */
- #define DMUS_TRACKCONFIG_TRANS1_FROMSEGSTART 0x400 /* Get track info from start of From segment */
- #define DMUS_TRACKCONFIG_TRANS1_FROMSEGCURRENT 0x800 /* Get track info from current place in From segment */
- #define DMUS_TRACKCONFIG_TRANS1_TOSEGSTART 0x1000 /* Get track info from start of To segment */
- #define DMUS_TRACKCONFIG_DEFAULT (DMUS_TRACKCONFIG_CONTROL_ENABLED | DMUS_TRACKCONFIG_PLAY_ENABLED | DMUS_TRACKCONFIG_NOTIFICATION_ENABLED)
-
- /* Get/SetParam structs for commands */
- /* PARAM structures, used by GetParam() and SetParam() */
- typedef struct _DMUS_COMMAND_PARAM
- {
- BYTE bCommand;
- BYTE bGrooveLevel;
- BYTE bGrooveRange;
- BYTE bRepeatMode;
- } DMUS_COMMAND_PARAM;
-
- typedef struct _DMUS_COMMAND_PARAM_2
- {
- MUSIC_TIME mtTime;
- BYTE bCommand;
- BYTE bGrooveLevel;
- BYTE bGrooveRange;
- BYTE bRepeatMode;
- } DMUS_COMMAND_PARAM_2;
-
- typedef IDirectMusicObject __RPC_FAR *LPDMUS_OBJECT;
- typedef IDirectMusicLoader __RPC_FAR *LPDMUS_LOADER;
- typedef IDirectMusicBand __RPC_FAR *LPDMUS_BAND;
-
- #define DMUSB_LOADED (1 << 0) /* Set when band has been loaded */
- #define DMUSB_DEFAULT (1 << 1) /* Set when band is default band for a style */
-
- /*////////////////////////////////////////////////////////////////////
- // IDirectMusicBand */
- #undef INTERFACE
- #define INTERFACE IDirectMusicBand
- DECLARE_INTERFACE_(IDirectMusicBand, IUnknown)
- {
- /* IUnknown */
- STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
- STDMETHOD_(ULONG,AddRef) (THIS) PURE;
- STDMETHOD_(ULONG,Release) (THIS) PURE;
-
- /* IDirectMusicBand */
- STDMETHOD(CreateSegment) (THIS_ IDirectMusicSegment** ppSegment) PURE;
- STDMETHOD(Download) (THIS_ IDirectMusicPerformance* pPerformance) PURE;
- STDMETHOD(Unload) (THIS_ IDirectMusicPerformance* pPerformance) PURE;
- };
-
- typedef IDirectMusicBand IDirectMusicBand8;
-
- /*////////////////////////////////////////////////////////////////////
- // IDirectMusicObject */
- #undef INTERFACE
- #define INTERFACE IDirectMusicObject
- DECLARE_INTERFACE_(IDirectMusicObject, IUnknown)
- {
- /* IUnknown */
- STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
- STDMETHOD_(ULONG,AddRef) (THIS) PURE;
- STDMETHOD_(ULONG,Release) (THIS) PURE;
-
- /* IDirectMusicObject */
- STDMETHOD(GetDescriptor) (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
- STDMETHOD(SetDescriptor) (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
- STDMETHOD(ParseDescriptor) (THIS_ LPSTREAM pStream,
- LPDMUS_OBJECTDESC pDesc) PURE;
- };
-
- typedef IDirectMusicObject IDirectMusicObject8;
-
- /*////////////////////////////////////////////////////////////////////
- // IDirectMusicLoader */
- #undef INTERFACE
- #define INTERFACE IDirectMusicLoader
- DECLARE_INTERFACE_(IDirectMusicLoader, IUnknown)
- {
- /* IUnknown */
- STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
- STDMETHOD_(ULONG,AddRef) (THIS) PURE;
- STDMETHOD_(ULONG,Release) (THIS) PURE;
-
- /* IDirectMusicLoader */
- STDMETHOD(GetObject) (THIS_ LPDMUS_OBJECTDESC pDesc,
- REFIID riid,
- LPVOID FAR *ppv) PURE;
- STDMETHOD(SetObject) (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
- STDMETHOD(SetSearchDirectory) (THIS_ REFGUID rguidClass,
- WCHAR *pwzPath,
- BOOL fClear) PURE;
- STDMETHOD(ScanDirectory) (THIS_ REFGUID rguidClass,
- WCHAR *pwzFileExtension,
- WCHAR *pwzScanFileName) PURE;
- STDMETHOD(CacheObject) (THIS_ IDirectMusicObject * pObject) PURE;
- STDMETHOD(ReleaseObject) (THIS_ IDirectMusicObject * pObject) PURE;
- STDMETHOD(ClearCache) (THIS_ REFGUID rguidClass) PURE;
- STDMETHOD(EnableCache) (THIS_ REFGUID rguidClass,
- BOOL fEnable) PURE;
- STDMETHOD(EnumObject) (THIS_ REFGUID rguidClass,
- DWORD dwIndex,
- LPDMUS_OBJECTDESC pDesc) PURE;
- };
-
- /*////////////////////////////////////////////////////////////////////
- // IDirectMusicLoader8 */
- #undef INTERFACE
- #define INTERFACE IDirectMusicLoader8
- DECLARE_INTERFACE_(IDirectMusicLoader8, IDirectMusicLoader)
- {
- /* IUnknown */
- STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
- STDMETHOD_(ULONG,AddRef) (THIS) PURE;
- STDMETHOD_(ULONG,Release) (THIS) PURE;
-
- /* IDirectMusicLoader */
- STDMETHOD(GetObject) (THIS_ LPDMUS_OBJECTDESC pDesc,
- REFIID riid,
- LPVOID FAR *ppv) PURE;
- STDMETHOD(SetObject) (THIS_ LPDMUS_OBJECTDESC pDesc) PURE;
- STDMETHOD(SetSearchDirectory) (THIS_ REFGUID rguidClass,
- WCHAR *pwzPath,
- BOOL fClear) PURE;
- STDMETHOD(ScanDirectory) (THIS_ REFGUID rguidClass,
- WCHAR *pwzFileExtension,
- WCHAR *pwzScanFileName) PURE;
- STDMETHOD(CacheObject) (THIS_ IDirectMusicObject * pObject) PURE;
- STDMETHOD(ReleaseObject) (THIS_ IDirectMusicObject * pObject) PURE;
- STDMETHOD(ClearCache) (THIS_ REFGUID rguidClass) PURE;
- STDMETHOD(EnableCache) (THIS_ REFGUID rguidClass,
- BOOL fEnable) PURE;
- STDMETHOD(EnumObject) (THIS_ REFGUID rguidClass,
- DWORD dwIndex,
- LPDMUS_OBJECTDESC pDesc) PURE;
-
- /* IDirectMusicLoader8 */
- STDMETHOD_(void, CollectGarbage) (THIS) PURE;
- STDMETHOD(ReleaseObjectByUnknown) (THIS_ IUnknown *pObject) PURE;
- STDMETHOD(LoadObjectFromFile) (THIS_ REFGUID rguidClassID,
- REFIID iidInterfaceID,
- WCHAR *pwzFilePath,
- void ** ppObject) PURE;
- };
-
- /* Stream object supports IDirectMusicGetLoader interface to access loader while file parsing. */
-
- #undef INTERFACE
- #define INTERFACE IDirectMusicGetLoader
- DECLARE_INTERFACE_(IDirectMusicGetLoader, IUnknown)
- {
- /* IUnknown */
- STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
- STDMETHOD_(ULONG,AddRef) (THIS) PURE;
- STDMETHOD_(ULONG,Release) (THIS) PURE;
-
- /* IDirectMusicGetLoader */
- STDMETHOD(GetLoader) (THIS_ IDirectMusicLoader ** ppLoader) PURE;
- };
-
- typedef IDirectMusicGetLoader IDirectMusicGetLoader8;
-
- /*////////////////////////////////////////////////////////////////////
- // IDirectMusicSegment */
- #undef INTERFACE
- #define INTERFACE IDirectMusicSegment
- DECLARE_INTERFACE_(IDirectMusicSegment, IUnknown)
- {
- /* IUnknown */
- STDMETHOD(QueryInterface) (THIS_ REFIID, LPVOID FAR *) PURE;
- STDMETHOD_(ULONG,AddRef) (THIS) PURE;
- STDMETHOD_(ULONG,Release) (THIS) PURE;
-
- /* IDirectMusicSegment */
- STDMETHOD(GetLength) (THIS_ MUSIC_TIME* pmtLength) PURE;
- STDMETHOD(SetLength) (THIS_ MUSIC_TIME mtLength) PURE;
- STDMETHOD(GetRepeats) (THIS_ DWORD* pdwRepeats) PURE;
- STDMETHOD(SetRepeats) (THIS_ DWORD dwRepeats) PURE;
- STDMETHOD(GetDefaultResolution) (THIS_ DWORD* pdwResolution) PURE;
- STDMETHOD(SetDefaultResolution) (THIS_ DWORD dwResolution) PURE;
- STDMETHOD(GetTrack) (THIS_ REFGUID rguidType,
- DWORD dwGroupBits,
- DWORD dwIndex,
- IDirectMusicTrack** ppTrack) PURE;
- STDMETHOD(GetTrackGroup) (THIS_ IDirectMusicTrack* pTrack,
- DWORD* pdwGroupBits) PURE;
- STDMETHOD(InsertTrack) (THIS_ IDirectMusicTrack* pTrack,
- DWORD dwGroupBits) PURE;
- STDMETHOD(RemoveTrack) (THIS_ IDirectMusicTrack* pTrack) PURE;
- STDMETHOD(InitPlay) (THIS_ IDirectMusicSegmentState** ppSegState,
- IDirectMusicPerformance* pPerformance,
- DWORD dwFlags) PURE;
- STDMETHOD(GetGraph) (THIS_ IDirectMusicGraph** ppGraph) PURE;
- STDMETHOD(SetGraph) (THIS_ IDirectMusicGraph* pGraph) PURE;
- STDMETHOD(AddNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
- STDMETHOD(RemoveNotificationType) (THIS_ REFGUID rguidNotificationType) PURE;
- STDMETHOD(GetParam) (THIS_ REFGUID rguidType,
- …
Large files files are truncated, but you can click here to view the full file