1 #ifndef _DMusProp_ 2 #define _DMusProp_ 3 4 //#include "dmusbuff.h" 5 6 #define STATIC_KSDATAFORMAT_SUBTYPE_DIRECTMUSIC\ 7 0x1a82f8bc, 0x3f8b, 0x11d2, {0xb7, 0x74, 0x00, 0x60, 0x08, 0x33, 0x16, 0xc1} 8 DEFINE_GUIDSTRUCT("1a82f8bc-3f8b-11d2-b774-0060083316c1", KSDATAFORMAT_SUBTYPE_DIRECTMUSIC); 9 #define KSDATAFORMAT_SUBTYPE_DIRECTMUSIC DEFINE_GUIDNAMED(KSDATAFORMAT_SUBTYPE_DIRECTMUSIC) 10 11 #define STATIC_KSNODETYPE_DMSYNTH\ 12 0x94824f88, 0x6183, 0x11d2, {0x8f, 0x7a, 0x0, 0xc0, 0x4f, 0xbf, 0x8f, 0xef} 13 DEFINE_GUIDSTRUCT("94824F88-6183-11d2-8F7A-00C04FBF8FEF", KSNODETYPE_DMSYNTH); 14 #define KSNODETYPE_DMSYNTH DEFINE_GUIDNAMED(KSNODETYPE_DMSYNTH) 15 16 #define STATIC_KSNODETYPE_DMSYNTH_CAPS\ 17 0xbca2a2f1, 0x93c6, 0x11d2, {0xba, 0x1d, 0x0, 0x0, 0xf8, 0x75, 0xac, 0x12} 18 DEFINE_GUIDSTRUCT("bca2a2f1-93c6-11d2-ba1d-0000f875ac12", KSNODETYPE_DMSYNTH_CAPS); 19 #define KSNODETYPE_DMSYNTH_CAPS DEFINE_GUIDNAMED(KSNODETYPE_DMSYNTH_CAPS) 20 21 #define STATIC_KSPROPSETID_Synth_Dls\ 22 0xd523fa2c, 0xdee3, 0x11d1, {0xa7, 0x89, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12} 23 DEFINE_GUIDSTRUCT("d523fa2c-dee3-11d1-a789-0000f875ac12", KSPROPSETID_Synth_Dls); 24 #define KSPROPSETID_Synth_Dls DEFINE_GUIDNAMED(KSPROPSETID_Synth_Dls) 25 26 typedef enum 27 { 28 KSPROPERTY_SYNTH_DLS_DOWNLOAD = 0, 29 KSPROPERTY_SYNTH_DLS_UNLOAD, 30 KSPROPERTY_SYNTH_DLS_COMPACT, 31 KSPROPERTY_SYNTH_DLS_APPEND, 32 KSPROPERTY_SYNTH_DLS_WAVEFORMAT 33 } KSPROPERTY_SYNTH_DLS; 34 35 typedef struct _SYNTH_BUFFER 36 { 37 ULONG BufferSize; 38 PVOID BufferAddress; 39 } SYNTH_BUFFER, *PSYNTH_BUFFER; 40 41 typedef struct _SYNTHDOWNLOAD 42 { 43 HANDLE DownloadHandle; 44 BOOL Free; 45 } SYNTHDOWNLOAD, *PSYNTHDOWNLOAD; 46 47 #define STATIC_KSPROPSETID_Synth\ 48 0xfedfae25L, 0xe46e, 0x11d1, {0xaa, 0xce, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12} 49 DEFINE_GUIDSTRUCT("fedfae25-e46e-11d1-aace-0000f875ac12", KSPROPSETID_Synth); 50 #define KSPROPSETID_Synth DEFINE_GUIDNAMED(KSPROPSETID_Synth) 51 52 typedef enum 53 { 54 KSPROPERTY_SYNTH_VOLUME = 0, 55 KSPROPERTY_SYNTH_VOLUMEBOOST, 56 KSPROPERTY_SYNTH_CAPS, 57 KSPROPERTY_SYNTH_PORTPARAMETERS, 58 KSPROPERTY_SYNTH_CHANNELGROUPS, 59 KSPROPERTY_SYNTH_VOICEPRIORITY, 60 KSPROPERTY_SYNTH_LATENCYCLOCK, 61 KSPROPERTY_SYNTH_RUNNINGSTATS 62 } KSPROPERTY_SYNTH; 63 64 #define SYNTH_PC_DLS (0x00000001) 65 #define SYNTH_PC_EXTERNAL (0x00000002) 66 #define SYNTH_PC_SOFTWARESYNTH (0x00000004) 67 #define SYNTH_PC_MEMORYSIZEFIXED (0x00000008) 68 #define SYNTH_PC_GMINHARDWARE (0x00000010) 69 #define SYNTH_PC_GSINHARDWARE (0x00000020) 70 #define SYNTH_PC_SYSTEMMEMORY (0x7fffffff) 71 72 #if (NTDDI_VERSION < NTDDI_WINXP) 73 #define SYNTH_PC_REVERB (0x00000040) 74 #elif (NTDDI_VERSION >= NTDDI_WINXP) 75 #define SYNTH_PC_XGINHARDWARE (0x00000040) 76 #define SYNTH_PC_DLS2 (0x00000200) 77 #define SYNTH_PC_REVERB (0x40000000) 78 #endif 79 80 typedef struct _SYNTHCAPS 81 { 82 GUID Guid; 83 DWORD Flags; 84 DWORD MemorySize; 85 DWORD MaxChannelGroups; 86 DWORD MaxVoices; 87 DWORD MaxAudioChannels; 88 DWORD EffectFlags; 89 WCHAR Description[128]; 90 } SYNTHCAPS, *PSYNTHCAPS; 91 92 93 typedef struct _SYNTH_PORTPARAMS 94 { 95 DWORD ValidParams; 96 DWORD Voices; 97 DWORD ChannelGroups; 98 DWORD AudioChannels; 99 DWORD SampleRate; 100 DWORD EffectsFlags; 101 DWORD Share; 102 } SYNTH_PORTPARAMS, *PSYNTH_PORTPARAMS; 103 104 #define SYNTH_PORTPARAMS_VOICES 0x00000001 105 #define SYNTH_PORTPARAMS_CHANNELGROUPS 0x00000002 106 #define SYNTH_PORTPARAMS_AUDIOCHANNELS 0x00000004 107 #define SYNTH_PORTPARAMS_SAMPLERATE 0x00000008 108 #define SYNTH_PORTPARAMS_EFFECTS 0x00000020 109 #define SYNTH_PORTPARAMS_SHARE 0x00000040 110 111 #define SYNTH_EFFECT_NONE 0x00000000 112 #define SYNTH_EFFECT_REVERB 0x00000001 113 #define SYNTH_EFFECT_CHORUS 0x00000002 114 #define SYNTH_EFFECT_DELAY 0x00000004 115 116 typedef struct _SYNTHVOICEPRIORITY_INSTANCE 117 { 118 DWORD ChannelGroup; 119 DWORD Channel; 120 } SYNTHVOICEPRIORITY_INSTANCE, *PSYNTHVOICEPRIORITY_INSTANCE; 121 122 typedef struct _SYNTH_STATS 123 { 124 DWORD ValidStats; 125 DWORD Voices; 126 DWORD TotalCPU; 127 DWORD CPUPerVoice; 128 DWORD LostNotes; 129 DWORD FreeMemory; 130 LONG PeakVolume; 131 } SYNTH_STATS, *PSYNTH_STATS; 132 133 134 #define SYNTH_STATS_VOICES (1 << 0) 135 #define SYNTH_STATS_TOTAL_CPU (1 << 1) 136 #define SYNTH_STATS_CPU_PER_VOICE (1 << 2) 137 #define SYNTH_STATS_LOST_NOTES (1 << 3) 138 #define SYNTH_STATS_PEAK_VOLUME (1 << 4) 139 #define SYNTH_STATS_FREE_MEMORY (1 << 5) 140 141 #ifndef _DIRECTAUDIO_PRIORITIES_DEFINED_ 142 #define _DIRECTAUDIO_PRIORITIES_DEFINED_ 143 144 #define DAUD_CRITICAL_VOICE_PRIORITY (0xF0000000) 145 #define DAUD_HIGH_VOICE_PRIORITY (0xC0000000) 146 #define DAUD_STANDARD_VOICE_PRIORITY (0x80000000) 147 #define DAUD_LOW_VOICE_PRIORITY (0x40000000) 148 #define DAUD_PERSIST_VOICE_PRIORITY (0x10000000) 149 150 #define DAUD_CHAN1_VOICE_PRIORITY_OFFSET (0x0000000E) 151 #define DAUD_CHAN2_VOICE_PRIORITY_OFFSET (0x0000000D) 152 #define DAUD_CHAN3_VOICE_PRIORITY_OFFSET (0x0000000C) 153 #define DAUD_CHAN4_VOICE_PRIORITY_OFFSET (0x0000000B) 154 #define DAUD_CHAN5_VOICE_PRIORITY_OFFSET (0x0000000A) 155 #define DAUD_CHAN6_VOICE_PRIORITY_OFFSET (0x00000009) 156 #define DAUD_CHAN7_VOICE_PRIORITY_OFFSET (0x00000008) 157 #define DAUD_CHAN8_VOICE_PRIORITY_OFFSET (0x00000007) 158 #define DAUD_CHAN9_VOICE_PRIORITY_OFFSET (0x00000006) 159 #define DAUD_CHAN10_VOICE_PRIORITY_OFFSET (0x0000000F) 160 #define DAUD_CHAN11_VOICE_PRIORITY_OFFSET (0x00000005) 161 #define DAUD_CHAN12_VOICE_PRIORITY_OFFSET (0x00000004) 162 #define DAUD_CHAN13_VOICE_PRIORITY_OFFSET (0x00000003) 163 #define DAUD_CHAN14_VOICE_PRIORITY_OFFSET (0x00000002) 164 #define DAUD_CHAN15_VOICE_PRIORITY_OFFSET (0x00000001) 165 #define DAUD_CHAN16_VOICE_PRIORITY_OFFSET (0x00000000) 166 167 #define DAUD_CHAN1_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN1_VOICE_PRIORITY_OFFSET) 168 #define DAUD_CHAN2_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN2_VOICE_PRIORITY_OFFSET) 169 #define DAUD_CHAN3_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN3_VOICE_PRIORITY_OFFSET) 170 #define DAUD_CHAN4_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN4_VOICE_PRIORITY_OFFSET) 171 #define DAUD_CHAN5_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN5_VOICE_PRIORITY_OFFSET) 172 #define DAUD_CHAN6_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN6_VOICE_PRIORITY_OFFSET) 173 #define DAUD_CHAN7_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN7_VOICE_PRIORITY_OFFSET) 174 #define DAUD_CHAN8_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN8_VOICE_PRIORITY_OFFSET) 175 #define DAUD_CHAN9_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN9_VOICE_PRIORITY_OFFSET) 176 #define DAUD_CHAN10_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN10_VOICE_PRIORITY_OFFSET) 177 #define DAUD_CHAN11_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN11_VOICE_PRIORITY_OFFSET) 178 #define DAUD_CHAN12_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN12_VOICE_PRIORITY_OFFSET) 179 #define DAUD_CHAN13_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN13_VOICE_PRIORITY_OFFSET) 180 #define DAUD_CHAN14_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN14_VOICE_PRIORITY_OFFSET) 181 #define DAUD_CHAN15_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN15_VOICE_PRIORITY_OFFSET) 182 #define DAUD_CHAN16_DEF_VOICE_PRIORITY (DAUD_STANDARD_VOICE_PRIORITY | DAUD_CHAN16_VOICE_PRIORITY_OFFSET) 183 #endif 184 185 typedef struct _SYNTH_REVERB_PARAMS 186 { 187 float fInGain; 188 float fReverbMix; 189 float fReverbTime; 190 float fHighFreqRTRatio; 191 } SYNTH_REVERB_PARAMS, *PSYNTH_REVERB_PARAMS; 192 193 194 #define STATIC_KSPROPSETID_SynthClock \ 195 0xfedfae26L, 0xe46e, 0x11d1, {0xaa, 0xce, 0x00, 0x00, 0xf8, 0x75, 0xac, 0x12} 196 DEFINE_GUIDSTRUCT("fedfae26-e46e-11d1-aace-0000f875ac12", KSPROPSETID_SynthClock); 197 #define KSPROPSETID_SynthClock DEFINE_GUIDNAMED(KSPROPSETID_SynthClock) 198 199 typedef enum 200 { 201 KSPROPERTY_SYNTH_MASTERCLOCK 202 } KSPROPERTY_SYNTHCLOCK; 203 #endif 204