xref: /reactos/sdk/include/dxsdk/dsconf.h (revision c2c66aff)
1 #ifndef __DSCONF_INCLUDED__
2 #define __DSCONF_INCLUDED__
3 
4 #ifndef __DSOUND_INCLUDED__
5 #error dsound.h not included
6 #endif
7 
8 #ifdef __cplusplus
9 extern "C" {
10 #endif
11 
12 DEFINE_GUID(CLSID_DirectSoundPrivate,      0x11AB3EC0, 0x25EC, 0x11D1, 0xA4, 0xD8, 0x0, 0xC0, 0x4F, 0xC2, 0x8A, 0xCA);
13 DEFINE_GUID(DSPROPSETID_DirectSoundDevice, 0x84624F82, 0x25EC, 0x11D1, 0xA4, 0xD8, 0x0, 0xC0, 0x4F, 0xC2, 0x8A, 0xCA);
14 
15 typedef enum
16 {
17     DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A = 1,
18     DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1 = 2,
19     DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1 = 3,
20     DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W = 4,
21     DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A = 5,
22     DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W = 6,
23     DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A = 7,
24     DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W = 8,
25 } DSPROPERTY_DIRECTSOUNDDEVICE;
26 
27 typedef enum
28 {
29     DIRECTSOUNDDEVICE_TYPE_EMULATED,
30     DIRECTSOUNDDEVICE_TYPE_VXD,
31     DIRECTSOUNDDEVICE_TYPE_WDM
32 } DIRECTSOUNDDEVICE_TYPE;
33 
34 typedef enum
35 {
36     DIRECTSOUNDDEVICE_DATAFLOW_RENDER,
37     DIRECTSOUNDDEVICE_DATAFLOW_CAPTURE
38 } DIRECTSOUNDDEVICE_DATAFLOW;
39 
40 typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA
41 {
42     LPSTR DeviceName;
43     DIRECTSOUNDDEVICE_DATAFLOW DataFlow;
44     GUID DeviceId;
45 } DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA;
46 
47 typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA
48 {
49     LPWSTR DeviceName;
50     DIRECTSOUNDDEVICE_DATAFLOW  DataFlow;
51     GUID DeviceId;
52 } DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA;
53 
54 typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA
55 {
56     GUID DeviceId;
57     CHAR DescriptionA[0x100];
58     WCHAR DescriptionW[0x100];
59     CHAR ModuleA[MAX_PATH];
60     WCHAR ModuleW[MAX_PATH];
61     DIRECTSOUNDDEVICE_TYPE Type;
62     DIRECTSOUNDDEVICE_DATAFLOW DataFlow;
63     ULONG WaveDeviceId;
64     ULONG Devnode;
65 } DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA;
66 
67 typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA
68 {
69     DIRECTSOUNDDEVICE_TYPE Type;
70     DIRECTSOUNDDEVICE_DATAFLOW DataFlow;
71     GUID DeviceId;
72     LPSTR Description;
73     LPSTR Module;
74     LPSTR Interface;
75     ULONG WaveDeviceId;
76 } DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA;
77 
78 typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA
79 {
80     DIRECTSOUNDDEVICE_TYPE Type;
81     DIRECTSOUNDDEVICE_DATAFLOW DataFlow;
82     GUID DeviceId;
83     LPWSTR Description;
84     LPWSTR Module;
85     LPWSTR Interface;
86     ULONG WaveDeviceId;
87 } DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA;
88 
89 #if DIRECTSOUND_VERSION >= 0x0700
90     #ifdef UNICODE
91         #define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W
92         #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W
93         #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W
94         #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA
95         #define PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA
96     #else
97         #define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A
98         #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A
99         #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A
100         #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA
101         #define PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA
102     #endif
103 #else
104     #define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A
105     #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1
106     #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1
107     #define DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA DSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA
108 #define PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA
109 #endif
110 
111 #ifdef UNICODE
112     #define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_DATA DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA
113     #define PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_W_DATA
114 #else
115     #define DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_DATA DSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA
116     #define PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_WAVEDEVICEMAPPING_A_DATA
117 #endif
118 
119 typedef BOOL (CALLBACK *LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK1)(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_1_DATA, LPVOID);
120 typedef BOOL (CALLBACK *LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKA)(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_A_DATA, LPVOID);
121 typedef BOOL (CALLBACK *LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKW)(PDSPROPERTY_DIRECTSOUNDDEVICE_DESCRIPTION_W_DATA, LPVOID);
122 
123 #if DIRECTSOUND_VERSION >= 0x0700
124     #ifdef UNICODE
125         #define LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKW
126     #else
127         #define LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKA
128     #endif
129 #else
130     #define LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK1
131 #endif
132 
133 typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA
134 {
135     LPFNDIRECTSOUNDDEVICEENUMERATECALLBACK1 Callback;
136     LPVOID Context;
137 } DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA;
138 
139 typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA
140 {
141     LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKA Callback;
142     LPVOID Context;
143 } DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA;
144 
145 typedef struct _DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA
146 {
147     LPFNDIRECTSOUNDDEVICEENUMERATECALLBACKW Callback;
148     LPVOID Context;
149 } DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA, *PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA;
150 
151 #if DIRECTSOUND_VERSION >= 0x0700
152     #ifdef UNICODE
153         #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA
154         #define PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_W_DATA
155     #else
156         #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA
157         #define PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_A_DATA
158     #endif
159 #else
160     #define DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA DSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA
161     #define PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_DATA PDSPROPERTY_DIRECTSOUNDDEVICE_ENUMERATE_1_DATA
162 #endif
163 
164 #ifdef __cplusplus
165 }
166 #endif
167 
168 #endif
169